ILIAS  trunk Revision v11.0_alpha-1702-gfd3ecb7f852
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
interface.ilRBACAccessHandler.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
29 {
33  public function storeAccessResult(
34  string $a_permission,
35  string $a_cmd,
36  int $a_ref_id,
37  bool $a_access_granted,
38  ?int $a_user_id = null,
39  ?ilAccessInfo $a_info = null
40  ): void;
41 
50  public function getStoredAccessResult(
51  string $a_permission,
52  string $a_cmd,
53  int $a_ref_id,
54  ?int $a_user_id = null
55  ): array;
56 
60  public function setPreventCachingLastResult(bool $a_val): void;
61 
65  public function getPreventCachingLastResult(): bool;
66 
67  public function getResults(): array;
68 
69  public function setResults(array $a_results);
70 
74  public function addInfoItem(string $a_type, string $a_text, string $a_data = ""): void;
75 
80  public function checkAccess(
81  string $a_permission,
82  string $a_cmd,
83  int $a_ref_id,
84  string $a_type = "",
85  ?int $a_obj_id = null,
86  ?int $a_tree_id = null
87  ): bool;
88 
93  public function checkAccessOfUser(
94  int $a_user_id,
95  string $a_permission,
96  string $a_cmd,
97  int $a_ref_id,
98  string $a_type = "",
99  ?int $a_obj_id = null,
100  ?int $a_tree_id = null
101  ): bool;
102 
107  public function getInfo(): array;
108 
112  public function getResultLast(): array;
113 
114  public function getResultAll(int $a_ref_id = 0): array;
115 
120  public function doCacheCheck(
121  string $a_permission,
122  string $a_cmd,
123  int $a_ref_id,
124  int $a_user_id
125  ): array;
126 
130  public function doTreeCheck(
131  string $a_permission,
132  string $a_cmd,
133  int $a_ref_id,
134  int $a_user_id
135  ): bool;
136 
141  public function doRBACCheck(
142  string $a_permission,
143  string $a_cmd,
144  int $a_ref_id,
145  int $a_user_id,
146  string $a_type
147  ): bool;
148 
152  public function doPathCheck(
153  string $a_permission,
154  string $a_cmd,
155  int $a_ref_id,
156  int $a_user_id,
157  bool $a_all = false
158  ): bool;
159 
163  public function doActivationCheck(
164  string $a_permission,
165  string $a_cmd,
166  int $a_ref_id,
167  int $a_user_id,
168  int $a_obj_id,
169  string $a_type
170  ): bool;
171 
175  public function doConditionCheck(
176  string $a_permission,
177  string $a_cmd,
178  int $a_ref_id,
179  int $a_user_id,
180  int $a_obj_id,
181  string $a_type
182  ): bool;
183 
187  public function doStatusCheck(
188  string $a_permission,
189  string $a_cmd,
190  int $a_ref_id,
191  int $a_user_id,
192  int $a_obj_id,
193  string $a_type
194  ): bool;
195 
196  public function clear(): void;
197 
201  public function enable(string $a_str, bool $a_bool): void;
202 }
Interface ilRBACAccessHandler Checks access for ILIAS objects.
addInfoItem(string $a_type, string $a_text, string $a_data="")
add an info item to current info object
class ilAccessInfo
checkAccess(string $a_permission, string $a_cmd, int $a_ref_id, string $a_type="", ?int $a_obj_id=null, ?int $a_tree_id=null)
check access for an object (provide $a_type and $a_obj_id if available for better performance) ...
setPreventCachingLastResult(bool $a_val)
Set prevent caching last result.
setResults(array $a_results)
getPreventCachingLastResult()
Get prevent caching last result.
getResultLast()
get last info object
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
doConditionCheck(string $a_permission, string $a_cmd, int $a_ref_id, int $a_user_id, int $a_obj_id, string $a_type)
condition check (currently only implemented for read permission)
getStoredAccessResult(string $a_permission, string $a_cmd, int $a_ref_id, ?int $a_user_id=null)
get stored access result
getResultAll(int $a_ref_id=0)
storeAccessResult(string $a_permission, string $a_cmd, int $a_ref_id, bool $a_access_granted, ?int $a_user_id=null, ?ilAccessInfo $a_info=null)
store access result
doPathCheck(string $a_permission, string $a_cmd, int $a_ref_id, int $a_user_id, bool $a_all=false)
check read permission for all parents
doActivationCheck(string $a_permission, string $a_cmd, int $a_ref_id, int $a_user_id, int $a_obj_id, string $a_type)
check for activation and centralized offline status.
getInfo()
get last info object
doCacheCheck(string $a_permission, string $a_cmd, int $a_ref_id, int $a_user_id)
look if result for current query is already in cache
enable(string $a_str, bool $a_bool)
doRBACCheck(string $a_permission, string $a_cmd, int $a_ref_id, int $a_user_id, string $a_type)
rbac check for current object -> type is used for create permission
checkAccessOfUser(int $a_user_id, string $a_permission, string $a_cmd, int $a_ref_id, string $a_type="", ?int $a_obj_id=null, ?int $a_tree_id=null)
check access for an object (provide $a_type and $a_obj_id if available for better performance) ...
doTreeCheck(string $a_permission, string $a_cmd, int $a_ref_id, int $a_user_id)
check if object is in tree and not deleted
doStatusCheck(string $a_permission, string $a_cmd, int $a_ref_id, int $a_user_id, int $a_obj_id, string $a_type)
object type specific check