ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
Claiming permission helper base class. More...
Public Member Functions | |
reset () | |
Reset (internal caches) More... | |
hasPermission ($a_context_type, $a_context_id, $a_action_id, $a_action_sub_id=null) | |
Check permission. More... | |
hasPermissions ($a_context_type, $a_context_id, array $a_action_ids) | |
Check permissions. More... | |
Static Public Member Functions | |
static | getInstance ($a_user_id=null, $a_ref_id=null) |
Factory. More... | |
Protected Member Functions | |
__construct ($a_user_id, $a_ref_id) | |
Constructor. More... | |
setUserId ($a_value) | |
Set user id. More... | |
getUserId () | |
Get user id. More... | |
setRefId ($a_value) | |
Set ref id. More... | |
getRefId () | |
Get ref id. More... | |
readContextIds ($a_context_type) | |
Get all context ids for context type (from DB, is cached) More... | |
buildPermissionMap () | |
Build map of context and actions. More... | |
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. More... | |
getValidContextIds ($a_context_type) | |
Get context ids for context type (uses cache) More... | |
checkPermission ($a_context_type, $a_context_id, $a_action_id, $a_action_sub_id=null) | |
Check permission (helper: rbac, plugins) More... | |
checkRBAC () | |
Check permission against RBAC. More... | |
getActivePlugins () | |
Get active plugins (for current slot) More... | |
checkPlugins ($a_context_type, $a_context_id, $a_action_id, $a_action_sub_id=null) | |
Check permission against plugins. More... | |
Protected Attributes | |
$user_id | |
$ref_id | |
$map | |
$context_ids | |
$plugins | |
Static Protected Attributes | |
static | $instances |
Claiming permission helper base class.
Definition at line 12 of file class.ilClaimingPermissionHelper.php.
|
protected |
Constructor.
int | $a_user_id | |
int | $a_ref_id |
Definition at line 32 of file class.ilClaimingPermissionHelper.php.
References buildPermissionMap(), reset(), setRefId(), and setUserId().
|
abstractprotected |
Build map of context and actions.
Referenced by __construct(), and getRefId().
|
protected |
Check permission (helper: rbac, plugins)
int | $a_context_type | |
int | $a_context_id | |
int | $a_action_id | |
int | $a_action_sub_id |
Definition at line 259 of file class.ilClaimingPermissionHelper.php.
References $a_context_id, $a_context_type, checkPlugins(), and checkRBAC().
Referenced by hasPermission().
|
protected |
Check permission against plugins.
int | $a_context_type | |
int | $a_context_id | |
int | $a_action_id | |
int | $a_action_sub_id |
Definition at line 294 of file class.ilClaimingPermissionHelper.php.
References $a_context_id, $a_context_type, $valid, array, and getActivePlugins().
Referenced by ilAdvancedMDPermissionHelper\checkPermission(), and checkPermission().
|
protected |
Check permission against RBAC.
Definition at line 270 of file class.ilClaimingPermissionHelper.php.
References getActivePlugins(), getRefId(), and getUserId().
Referenced by ilAdvancedMDPermissionHelper\checkPermission(), and checkPermission().
|
abstractprotected |
Get active plugins (for current slot)
Referenced by checkPlugins(), and checkRBAC().
|
static |
Factory.
int | $a_user_id | |
int | $a_ref_id |
Definition at line 47 of file class.ilClaimingPermissionHelper.php.
References $ilUser.
Referenced by ilCustomUserFieldsGUI\__construct(), and ilAdvancedMDSettingsGUI\__construct().
|
protected |
Get ref id.
Definition at line 112 of file class.ilClaimingPermissionHelper.php.
References $a_context_type, $ref_id, buildPermissionMap(), and readContextIds().
Referenced by ilAdvancedMDPermissionHelper\checkPermission(), and checkRBAC().
|
protected |
Get user id.
Definition at line 92 of file class.ilClaimingPermissionHelper.php.
References $user_id.
Referenced by ilAdvancedMDPermissionHelper\checkPermission(), and checkRBAC().
|
protected |
Get context ids for context type (uses cache)
int | $a_context_type |
Definition at line 193 of file class.ilClaimingPermissionHelper.php.
References $a_context_type, array, and readContextIds().
Referenced by isValidContextAndAction().
ilClaimingPermissionHelper::hasPermission | ( | $a_context_type, | |
$a_context_id, | |||
$a_action_id, | |||
$a_action_sub_id = null |
|||
) |
Check permission.
int | $a_context_type | |
int | $a_context_id | |
int | $a_action_id | |
int | $a_action_sub_id |
Definition at line 211 of file class.ilClaimingPermissionHelper.php.
References $a_context_id, $a_context_type, checkPermission(), and isValidContextAndAction().
Referenced by hasPermissions(), and ilAdvancedMDFieldDefinition\importDefinitionFormPostValues().
ilClaimingPermissionHelper::hasPermissions | ( | $a_context_type, | |
$a_context_id, | |||
array | $a_action_ids | ||
) |
Check permissions.
int | $a_context_type | |
int | $a_context_id | |
array | $a_action_ids |
Definition at line 228 of file class.ilClaimingPermissionHelper.php.
References $a_context_id, $a_context_type, $res, array, and hasPermission().
Referenced by ilAdvancedMDFieldDefinition\addToFieldDefinitionForm().
|
protected |
Check if given combination of context and action is valid.
int | $a_context_type | |
mixed | $a_context_id | |
int | $a_action_id | |
int | $a_action_sub_id |
Definition at line 148 of file class.ilClaimingPermissionHelper.php.
References $a_context_id, $a_context_type, $valid, and getValidContextIds().
Referenced by hasPermission().
|
abstractprotected |
Get all context ids for context type (from DB, is cached)
int | $a_context_type |
Referenced by getRefId(), and getValidContextIds().
ilClaimingPermissionHelper::reset | ( | ) |
Reset (internal caches)
Definition at line 69 of file class.ilClaimingPermissionHelper.php.
References array.
Referenced by __construct().
|
protected |
Set ref id.
int | $a_value |
Definition at line 102 of file class.ilClaimingPermissionHelper.php.
Referenced by __construct().
|
protected |
Set user id.
int | $a_value |
Definition at line 82 of file class.ilClaimingPermissionHelper.php.
Referenced by __construct().
|
protected |
Definition at line 17 of file class.ilClaimingPermissionHelper.php.
|
staticprotected |
Definition at line 20 of file class.ilClaimingPermissionHelper.php.
|
protected |
Definition at line 16 of file class.ilClaimingPermissionHelper.php.
|
protected |
Definition at line 18 of file class.ilClaimingPermissionHelper.php.
|
protected |
Definition at line 15 of file class.ilClaimingPermissionHelper.php.
Referenced by getRefId().
|
protected |
Definition at line 14 of file class.ilClaimingPermissionHelper.php.
Referenced by getUserId().