ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f87
ilObjItemGroupAccess Class Reference

Item group access class. More...

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

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...

 
 _checkGoto ($a_target)
 check whether goto script will succeed 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...
 
 _getCommands ()
 get commands More...
 
 _checkGoto ($a_target)
 check whether goto script will succeed More...
 
 _preloadData ($a_obj_ids, $a_ref_ids)
 Preload data. More...
 

Static Public Member Functions

 _getCommands ()
 get list of command/permission combinations More...
 
- Static Public Member Functions inherited from ilObjectAccess
static _isOffline ($a_obj_id)
 Type-specific implementation of general status, has to be overwritten. More...
 

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.

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 49 of file class.ilObjItemGroupAccess.php.

References $ilUser, and $lng.

50  {
51  global $ilUser, $lng, $rbacsystem, $ilAccess;
52 
53  $a_user_id = $a_user_id ? $a_user_id : $ilUser->getId();
54  return true;
55  }
global $ilUser
Definition: imgupload.php:15
global $lng
Definition: privfeed.php:40

◆ _checkGoto()

ilObjItemGroupAccess::_checkGoto (   $a_target)

check whether goto script will succeed

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

62  {
63  global $ilAccess;
64 
65  $t_arr = explode("_", $a_target);
66 
67  if ($t_arr[0] != "itgr" || ((int) $t_arr[1]) <= 0)
68  {
69  return false;
70  }
71 
72  if($ilAccess->checkAccess("read", "", $t_arr[1]))
73  {
74  return true;
75  }
76  return false;
77  }

◆ _getCommands()

ilObjItemGroupAccess::_getCommands ( )
static

get list of command/permission combinations

public

Returns
array

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

Referenced by ilObjItemGroupListGUI\init().

26  {
27  $commands = array
28  (
29  array("permission" => "read", "cmd" => "gotoParent", "lang_var" => "", "default" => true),
30  array("permission" => "write", "cmd" => "listMaterials", "lang_var" => "edit_content", "default" => false),
31  array("permission" => "write", "cmd" => "edit", "lang_var" => "settings", "default" => false)
32  );
33 
34  return $commands;
35  }
+ Here is the caller graph for this function:

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