ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilContainerReferenceAccess Class Reference
+ Inheritance diagram for ilContainerReferenceAccess:
+ Collaboration diagram for ilContainerReferenceAccess:

Public Member Functions

 _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::checkAccess) More...
 
- Public Member Functions inherited from ilObjectAccess
 _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::checkAccess) More...
 
 _checkCondition ($a_obj_id, $a_operator, $a_value, $a_usr_id)
 check condition More...
 
 canBeDelivered (ilWACPath $ilWACPath)
 
Parameters
ilWACPath$ilWACPath
Returns
bool
More...
 

Static Public Member Functions

static _isAccessible ($a_ref_id)
 Check if target is accessible and not deleted. More...
 
- Static Public Member Functions inherited from ilObjectAccess
static _getCommands ()
 get commands More...
 
static _checkGoto ($a_target)
 check whether goto script will succeed More...
 
static _isOffline ($a_obj_id)
 Type-specific implementation of general status, has to be overwritten if object type does not support centralized offline handling. More...
 
static _preloadData ($a_obj_ids, $a_ref_ids)
 Preload data. More...
 

Detailed Description

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 36 of file class.ilContainerReferenceAccess.php.

Member Function Documentation

◆ _checkAccess()

ilContainerReferenceAccess::_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::checkAccess)

Parameters
string$a_cmdcommand (not permission!)
string$a_permissionpermission
int$a_ref_idreference id
int$a_obj_idobject id
int$a_user_iduser id (if not provided, current user is taken)
Returns
boolean true, if everything is ok

Definition at line 50 of file class.ilContainerReferenceAccess.php.

51  {
52  return true;
53  }

◆ _isAccessible()

static ilContainerReferenceAccess::_isAccessible (   $a_ref_id)
static

Check if target is accessible and not deleted.

Parameters
int$a_ref_idref_id
Returns
bool

Definition at line 61 of file class.ilContainerReferenceAccess.php.

References $DIC, $ilDB, $query, $res, $row, $target_id, $tree, ilObject\_getAllReferences(), ilObject\_lookupObjId(), and ilDBConstants\FETCHMODE_OBJECT.

Referenced by ilRepositoryExplorer\isClickable(), and ilRepositoryExplorerGUI\isNodeClickable().

62  {
63  global $DIC;
64 
65  $ilDB = $DIC->database();
66  $tree = $DIC->repositoryTree();
67  $access = $DIC->access();
68 
69  $obj_id = ilObject::_lookupObjId($a_ref_id);
70  $query = "SELECT target_obj_id FROM container_reference " .
71  "WHERE obj_id = " . $ilDB->quote($obj_id, 'integer') . " ";
72  $res = $ilDB->query($query);
73  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
74  $target_id = $row->target_obj_id;
75  }
76  $target_ref_ids = ilObject::_getAllReferences($target_id);
77  $target_ref_id = current($target_ref_ids);
78  return
79  !$tree->isDeleted($target_ref_id) &&
80  $access->checkAccess('read', '', $target_ref_id);
81  }
global $DIC
Definition: saml.php:7
$target_id
Definition: goto.php:49
static _getAllReferences($a_id)
get all reference ids of object
foreach($_POST as $key=> $value) $res
static _lookupObjId($a_id)
$query
$row
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: