ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilObjItemGroupAccess.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2012 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
5 include_once './Services/Object/classes/class.ilObjectAccess.php';
6 
16 {
17 
25  public static function _getCommands()
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  }
36 
49  public function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id = "")
50  {
51  global $ilUser, $lng, $rbacsystem, $ilAccess;
52 
53  $a_user_id = $a_user_id ? $a_user_id : $ilUser->getId();
54  return true;
55  }
56 
57 
61  public static function _checkGoto($a_target)
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  }
78 
79 }
80 ?>
static _getCommands()
get list of command/permission combinations
Item group access class.
static _checkGoto($a_target)
check whether goto script will succeed
$ilUser
Definition: imgupload.php:18
Create styles array
The data for the language used.
Class ilObjectAccess.
global $lng
Definition: privfeed.php:17
_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::checkAcc...