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

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...
 
 _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...
 
 canBeDelivered (ilWACPath $ilWACPath)
 

Static Public Member Functions

static _getCommands ($a_ref_id=0)
 get commands More...
 
- Static Public Member Functions inherited from ilContainerReferenceAccess
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

Member Function Documentation

◆ _checkAccess()

ilObjGroupReferenceAccess::_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)

Please do not check any preconditions handled by ilConditionHandler here. Also don't do any RBAC checks.

@global ilAccessHandler $ilAccess

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

Reimplemented from ilContainerReferenceAccess.

Definition at line 32 of file class.ilObjGroupReferenceAccess.php.

33 {
34 global $DIC;
35
36 $ilAccess = $DIC['ilAccess'];
37
38 switch ($a_permission) {
39 case 'visible':
40 case 'read':
41 include_once './Modules/GroupReference/classes/class.ilObjGroupReference.php';
42 $target_ref_id = ilObjGroupReference::_lookupTargetRefId($a_obj_id);
43
44 if (!$ilAccess->checkAccessOfUser($a_user_id, $a_permission, $a_cmd, $target_ref_id)) {
45 return false;
46 }
47 break;
48 }
49
50 return true;
51 }
static _lookupTargetRefId($a_obj_id)
Lookup target ref_id.
global $DIC
Definition: saml.php:7

References $DIC, and ilContainerReference\_lookupTargetRefId().

+ Here is the call graph for this function:

◆ _getCommands()

static ilObjGroupReferenceAccess::_getCommands (   $a_ref_id = 0)
static

get commands

Depends on permissions

@global ilAccessHandler $ilAccess

Parameters
int$a_ref_idReference id of group link

this method returns an array of all possible commands/permission combinations

example: $commands = array ( array("permission" => "read", "cmd" => "view", "lang_var" => "show"), array("permission" => "write", "cmd" => "edit", "lang_var" => "edit"), );

Returns
array

Definition at line 73 of file class.ilObjGroupReferenceAccess.php.

74 {
75 global $DIC;
76
77 $ilAccess = $DIC['ilAccess'];
78
79 if ($ilAccess->checkAccess('write', '', $a_ref_id)) {
80 // Only local (reference specific commands)
81 $commands = array(
82 array("permission" => "visible", "cmd" => "", "lang_var" => "show","default" => true),
83 array("permission" => "write", "cmd" => "editReference", "lang_var" => "edit")
84 );
85 } else {
86 include_once('./Modules/Group/classes/class.ilObjGroupAccess.php');
88 }
89 return $commands;
90 }
static _getCommands()
get commands

References $DIC, and ilObjGroupAccess\_getCommands().

+ Here is the call graph for this function:

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