ILIAS
Release_5_0_x_branch Revision 61816
|
Claiming permission helper base class. More...
Public Member Functions | |
reset () | |
Reset (internal caches) | |
hasPermission ($a_context_type, $a_context_id, $a_action_id, $a_action_sub_id=null) | |
Check permission. | |
hasPermissions ($a_context_type, $a_context_id, array $a_action_ids) | |
Check permissions. |
Static Public Member Functions | |
static | getInstance ($a_user_id=null, $a_ref_id=null) |
Factory. |
Protected Member Functions | |
__construct ($a_user_id, $a_ref_id) | |
Constructor. | |
setUserId ($a_value) | |
Set user id. | |
getUserId () | |
Get user id. | |
setRefId ($a_value) | |
Set ref id. | |
getRefId () | |
Get ref id. | |
readContextIds ($a_context_type) | |
Get all context ids for context type (from DB, is cached) | |
buildPermissionMap () | |
Build map of context and actions. | |
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. | |
getValidContextIds ($a_context_type) | |
Get context ids for context type (uses cache) | |
checkPermission ($a_context_type, $a_context_id, $a_action_id, $a_action_sub_id=null) | |
Check permission (helper: rbac, plugins) | |
checkRBAC () | |
Check permission against RBAC. | |
getActivePlugins () | |
Get active plugins (for current slot) | |
checkPlugins ($a_context_type, $a_context_id, $a_action_id, $a_action_sub_id=null) | |
Check permission against plugins. |
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.
Reimplemented in ilAdvancedMDPermissionHelper, and ilUDFPermissionHelper.
Referenced by __construct().
|
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 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 $valid, and getActivePlugins().
Referenced by checkPermission().
|
protected |
Check permission against RBAC.
Definition at line 270 of file class.ilClaimingPermissionHelper.php.
References getRefId(), and getUserId().
Referenced by checkPermission().
|
abstractprotected |
Get active plugins (for current slot)
Reimplemented in ilAdvancedMDPermissionHelper, and ilUDFPermissionHelper.
Referenced by checkPlugins().
|
static |
Factory.
int | $a_user_id | |
int | $a_ref_id |
Definition at line 47 of file class.ilClaimingPermissionHelper.php.
References $_REQUEST, and $ilUser.
Referenced by ilCustomUserFieldsGUI\__construct(), and ilAdvancedMDSettingsGUI\__construct().
|
protected |
Get ref id.
Definition at line 112 of file class.ilClaimingPermissionHelper.php.
References $ref_id.
Referenced by checkRBAC().
|
protected |
Get user id.
Definition at line 92 of file class.ilClaimingPermissionHelper.php.
References $user_id.
Referenced by checkRBAC().
|
protected |
Get context ids for context type (uses cache)
int | $a_context_type |
Definition at line 193 of file class.ilClaimingPermissionHelper.php.
References 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 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 $res, 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 $valid, and getValidContextIds().
Referenced by hasPermission().
|
abstractprotected |
Get all context ids for context type (from DB, is cached)
int | $a_context_type |
Reimplemented in ilAdvancedMDPermissionHelper, and ilUDFPermissionHelper.
Referenced by getValidContextIds().
ilClaimingPermissionHelper::reset | ( | ) |
Reset (internal caches)
Definition at line 69 of file class.ilClaimingPermissionHelper.php.
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().