ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 {
20  protected $user;
21 
25  protected $lng;
26 
30  protected $rbacsystem;
31 
35  protected $access;
36 
37 
41  public function __construct()
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  }
50 
51 
59  public static function _getCommands()
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  }
69 
82  public function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id = "")
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  }
92 
93 
97  public static function _checkGoto($a_target)
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  }
114 }
static _getCommands()
get list of command/permission combinations
Item group access class.
global $DIC
Definition: saml.php:7
user()
Definition: user.php:4
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.
_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::checkAcce...