ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilObjectAccess.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 
17 {
33  public function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id = "")
34  {
35 
36  // add no access info item and return false if access is not granted
37  // $ilAccess->addInfoItem(IL_NO_OBJECT_ACCESS, $a_text, $a_data = "");
38  //
39  // for all RBAC checks use checkAccessOfUser instead the normal checkAccess-method:
40  // $rbacsystem->checkAccessOfUser($a_user_id, $a_permission, $a_ref_id)
41 
42  return true;
43  }
44 
50  public function _checkCondition($a_obj_id, $a_operator, $a_value, $a_usr_id)
51  {
52  switch ($a_operator) {
53  default:
54  return true;
55  }
56  }
57 
70  public static function _getCommands()
71  {
72  $commands = array(
73  array()
74  );
75 
76  return $commands;
77  }
78 
82  public static function _checkGoto($a_target)
83  {
84  global $DIC;
85 
86  $ilAccess = $DIC->access();
87 
88  $t_arr = explode("_", $a_target);
89 
90  if ($ilAccess->checkAccess("read", "", $t_arr[1])) {
91  return true;
92  }
93  return false;
94  }
95 
105  public static function _isOffline($a_obj_id)
106  {
107  global $DIC;
108 
109  $objDefinition = $DIC['objDefinition'];
110  if ($objDefinition->supportsOfflineHandling(ilObject::_lookupType($a_obj_id))) {
111  return ilObject::lookupOfflineStatus($a_obj_id);
112  }
113  return null;
114  }
115 
121  public static function _preloadData($a_obj_ids, $a_ref_ids)
122  {
123  }
124 
128  public function canBeDelivered(ilWACPath $ilWACPath)
129  {
130  global $ilAccess;
131 
132  preg_match("/\\/obj_([\\d]*)\\//uism", $ilWACPath->getPath(), $results);
133  foreach (ilObject2::_getAllReferences($results[1]) as $ref_id) {
134  if ($ilAccess->checkAccess('visible', '', $ref_id) || $ilAccess->checkAccess('read', '', $ref_id)) {
135  return true;
136  }
137  }
138 
139  return false;
140  }
141 }
global $DIC
Definition: saml.php:7
_checkCondition($a_obj_id, $a_operator, $a_value, $a_usr_id)
check condition
Class ilWACPath.
static _checkGoto($a_target)
check whether goto script will succeed
static _getAllReferences($a_id)
static _getCommands()
get commands
static _isOffline($a_obj_id)
Type-specific implementation of general status, has to be overwritten if object type does not support...
static _preloadData($a_obj_ids, $a_ref_ids)
Preload data.
static lookupOfflineStatus($a_obj_id)
Lookup offline status using objectDataCache.
Class ilWACCheckingClass.
static _lookupType($a_id, $a_reference=false)
lookup object type
_checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id="")
Checks wether a user may invoke a command or not (this method is called by ilAccessHandler::checkAcce...
Class ilObjectAccess.
$results
Definition: svg-scanner.php:47
canBeDelivered(ilWACPath $ilWACPath)
bool