ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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
5include_once './Services/Object/classes/class.ilObjectAccess.php';
6
16{
17
25 public 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 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?>
Item group access class.
_getCommands()
get list of command/permission combinations
_checkGoto($a_target)
check whether goto script will succeed
_checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id="")
Class ilObjectAccess.
global $lng
Definition: privfeed.php:40
global $ilUser
Definition: imgupload.php:15