ILIAS  release_8 Revision v8.24
interface.ilRBACAccessHandler.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
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 storeCache(): void;
68
69 public function readCache(int $a_secs = 0): bool;
70
71 public function getResults(): array;
72
73 public function setResults(array $a_results);
74
78 public function addInfoItem(string $a_type, string $a_text, string $a_data = ""): void;
79
84 public function checkAccess(
85 string $a_permission,
86 string $a_cmd,
87 int $a_ref_id,
88 string $a_type = "",
89 ?int $a_obj_id = null,
90 ?int $a_tree_id = null
91 ): bool;
92
97 public function checkAccessOfUser(
98 int $a_user_id,
99 string $a_permission,
100 string $a_cmd,
101 int $a_ref_id,
102 string $a_type = "",
103 ?int $a_obj_id = null,
104 ?int $a_tree_id = null
105 ): bool;
106
111 public function getInfo(): array;
112
116 public function getResultLast(): array;
117
118 public function getResultAll(int $a_ref_id = 0): array;
119
124 public function doCacheCheck(
125 string $a_permission,
126 string $a_cmd,
127 int $a_ref_id,
128 int $a_user_id
129 ): array;
130
134 public function doTreeCheck(
135 string $a_permission,
136 string $a_cmd,
137 int $a_ref_id,
138 int $a_user_id
139 ): bool;
140
145 public function doRBACCheck(
146 string $a_permission,
147 string $a_cmd,
148 int $a_ref_id,
149 int $a_user_id,
150 string $a_type
151 ): bool;
152
156 public function doPathCheck(
157 string $a_permission,
158 string $a_cmd,
159 int $a_ref_id,
160 int $a_user_id,
161 bool $a_all = false
162 ): bool;
163
167 public function doActivationCheck(
168 string $a_permission,
169 string $a_cmd,
170 int $a_ref_id,
171 int $a_user_id,
172 int $a_obj_id,
173 string $a_type
174 ): bool;
175
179 public function doConditionCheck(
180 string $a_permission,
181 string $a_cmd,
182 int $a_ref_id,
183 int $a_user_id,
184 int $a_obj_id,
185 string $a_type
186 ): bool;
187
191 public function doStatusCheck(
192 string $a_permission,
193 string $a_cmd,
194 int $a_ref_id,
195 int $a_user_id,
196 int $a_obj_id,
197 string $a_type
198 ): bool;
199
200 public function clear(): void;
201
205 public function enable(string $a_str, bool $a_bool): void;
206}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getStoredAccessResult(string $a_permission, string $a_cmd, int $a_ref_id, ?int $a_user_id=null)
get stored access result
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)
getPreventCachingLastResult()
Get prevent caching last result.
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
setResults(array $a_results)
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)
addInfoItem(string $a_type, string $a_text, string $a_data="")
add an info item to current info object
readCache(int $a_secs=0)
getResultLast()
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
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
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
setPreventCachingLastResult(bool $a_val)
Set prevent caching last result.
getResultAll(int $a_ref_id=0)
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)
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
enable(string $a_str, bool $a_bool)
@deprected
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
doTreeCheck(string $a_permission, string $a_cmd, int $a_ref_id, int $a_user_id)
check if object is in tree and not deleted