ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilObjItemGroupAccess Class Reference

Item group access class. More...

+ Inheritance diagram for ilObjItemGroupAccess:
+ Collaboration diagram for ilObjItemGroupAccess:

Public Member Functions

 __construct ()
 Constructor. 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...
 

Static Public Member Functions

static _getCommands ()
 get list of command/permission combinations More...
 
static _checkGoto ($a_target)
 check whether goto script will succeed 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...
 

Protected Attributes

 $user
 
 $lng
 
 $rbacsystem
 
 $access
 

Detailed Description

Item group access class.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 15 of file class.ilObjItemGroupAccess.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjItemGroupAccess::__construct ( )

Constructor.

Definition at line 41 of file class.ilObjItemGroupAccess.php.

References $DIC, and user().

42  {
43  global $DIC;
44 
45  $this->user = $DIC->user();
46  $this->lng = $DIC->language();
47  $this->rbacsystem = $DIC->rbac()->system();
48  $this->access = $DIC->access();
49  }
global $DIC
Definition: saml.php:7
user()
Definition: user.php:4
+ Here is the call graph for this function:

Member Function Documentation

◆ _checkAccess()

ilObjItemGroupAccess::_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 82 of file class.ilObjItemGroupAccess.php.

References $access, $ilUser, $lng, $rbacsystem, and $user.

83  {
85  $lng = $this->lng;
87  $ilAccess = $this->access;
88 
89  $a_user_id = $a_user_id ? $a_user_id : $ilUser->getId();
90  return true;
91  }
$ilUser
Definition: imgupload.php:18

◆ _checkGoto()

static ilObjItemGroupAccess::_checkGoto (   $a_target)
static

check whether goto script will succeed

Definition at line 97 of file class.ilObjItemGroupAccess.php.

References $DIC.

98  {
99  global $DIC;
100 
101  $ilAccess = $DIC->access();
102 
103  $t_arr = explode("_", $a_target);
104 
105  if ($t_arr[0] != "itgr" || ((int) $t_arr[1]) <= 0) {
106  return false;
107  }
108 
109  if ($ilAccess->checkAccess("read", "", $t_arr[1])) {
110  return true;
111  }
112  return false;
113  }
global $DIC
Definition: saml.php:7

◆ _getCommands()

static ilObjItemGroupAccess::_getCommands ( )
static

get list of command/permission combinations

public

Returns
array

Definition at line 59 of file class.ilObjItemGroupAccess.php.

Referenced by ilObjItemGroupListGUI\init().

60  {
61  $commands = array(
62  array("permission" => "read", "cmd" => "gotoParent", "lang_var" => "", "default" => true),
63  array("permission" => "write", "cmd" => "listMaterials", "lang_var" => "edit_content", "default" => false),
64  array("permission" => "write", "cmd" => "edit", "lang_var" => "settings", "default" => false)
65  );
66 
67  return $commands;
68  }
+ Here is the caller graph for this function:

Field Documentation

◆ $access

ilObjItemGroupAccess::$access
protected

Definition at line 35 of file class.ilObjItemGroupAccess.php.

Referenced by _checkAccess().

◆ $lng

ilObjItemGroupAccess::$lng
protected

Definition at line 25 of file class.ilObjItemGroupAccess.php.

Referenced by _checkAccess().

◆ $rbacsystem

ilObjItemGroupAccess::$rbacsystem
protected

Definition at line 30 of file class.ilObjItemGroupAccess.php.

Referenced by _checkAccess().

◆ $user

ilObjItemGroupAccess::$user
protected

Definition at line 20 of file class.ilObjItemGroupAccess.php.

Referenced by _checkAccess().


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