47 public static function getInstance($a_user_id = null, $a_ref_id = null)
53 $a_user_id = $ilUser->getId();
57 $a_ref_id = (int)$_REQUEST[
"ref_id"];
59 if(!isset(self::$instances[$a_user_id][$a_ref_id]))
61 self::$instances[$a_user_id][$a_ref_id] =
new static($a_user_id, $a_ref_id);
63 return self::$instances[$a_user_id][$a_ref_id];
71 $this->context_ids =
array();
84 $this->user_id = (int)$a_value;
104 $this->ref_id = (int)$a_value;
154 if(!$a_action_sub_id)
163 if(array_key_exists($a_action_id, $this->map[
$a_context_type][
"subactions"]) &&
164 in_array($a_action_sub_id, $this->map[$a_context_type][
"subactions"][$a_action_id]))
232 foreach($a_action_ids as $action_id)
234 if(is_array($action_id))
236 $action_sub_id = $action_id[1];
237 $action_id = $action_id[0];
275 return $ilAccess->checkAccessOfUser($this->
getUserId(),
"write",
"", $this->
getRefId());
298 if(!is_array($this->plugins))
303 foreach($this->plugins as $plugin)
static getInstance($a_user_id=null, $a_ref_id=null)
Factory.
hasPermissions($a_context_type, $a_context_id, array $a_action_ids)
Check permissions.
Claiming permission helper base class.
checkPermission($a_context_type, $a_context_id, $a_action_id, $a_action_sub_id=null)
Check permission (helper: rbac, plugins)
readContextIds($a_context_type)
Get all context ids for context type (from DB, is cached)
getActivePlugins()
Get active plugins (for current slot)
buildPermissionMap()
Build map of context and actions.
hasPermission($a_context_type, $a_context_id, $a_action_id, $a_action_sub_id=null)
Check permission.
reset()
Reset (internal caches)
checkRBAC()
Check permission against RBAC.
isValidContextAndAction($a_context_type, $a_context_id, $a_action_id, $a_action_sub_id=null)
Check if given combination of context and action is valid.
setRefId($a_value)
Set ref id.
Create styles array
The data for the language used.
checkPlugins($a_context_type, $a_context_id, $a_action_id, $a_action_sub_id=null)
Check permission against plugins.
__construct($a_user_id, $a_ref_id)
Constructor.
setUserId($a_value)
Set user id.
getValidContextIds($a_context_type)
Get context ids for context type (uses cache)