ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
class ilRbacSystem system function like checkAccess, addActiveRole ... More...
Public Member Functions | |
checkAccess ($a_operations, $a_ref_id, $a_type="") | |
checkAccess represents the main method of the RBAC-system in ILIAS3 developers want to use With this method you check the permissions a use may have due to its roles on an specific object. More... | |
checkAccessOfUser ($a_user_id, $a_operations, $a_ref_id, $a_type="") | |
preloadRbacPaCache ($a_ref_ids, $a_user_id) | |
Preload rbac_pa cache. More... | |
checkPermission ($a_ref_id, $a_rol_id, $a_operation) | |
check if a specific role has the permission '$a_operation' of an object public More... | |
__filterOwnerPermissions ($a_user_id, $a_operations, $a_ref_id) | |
initMemberView () | |
Init member view. More... | |
addTemporaryRole ($a_usr_id, $a_role_id) | |
resetPACache ($a_usr_id, $a_ref_id) | |
Static Public Member Functions | |
static | getInstance () |
static | resetCaches () |
Reset internal caches. More... | |
Data Fields | |
$ilias | |
Protected Member Functions | |
__construct () | |
Constructor public. More... | |
Protected Attributes | |
$mem_view | |
Static Protected Attributes | |
static | $instance = null |
static | $user_role_cache = array() |
Private Member Functions | |
fetchAssignedRoles ($a_usr_id, $a_ref_id) | |
Fetch assigned roles This method caches the assigned roles per user. More... | |
Static Private Attributes | |
static | $_paCache = null |
static | $_checkAccessOfUserCache = null |
class ilRbacSystem system function like checkAccess, addActiveRole ...
Supporting system functions are required for session management and in making access control decisions. This class depends on the session since we offer the possiblility to add or delete active roles during one session.
Definition at line 16 of file class.ilRbacSystem.php.
|
protected |
Constructor public.
Definition at line 35 of file class.ilRbacSystem.php.
References $ilDB, $ilErr, $ilias, array, and PEAR_ERROR_CALLBACK.
ilRbacSystem::__filterOwnerPermissions | ( | $a_user_id, | |
$a_operations, | |||
$a_ref_id | |||
) |
Definition at line 329 of file class.ilRbacSystem.php.
References $ilUser.
Referenced by checkAccessOfUser().
ilRbacSystem::addTemporaryRole | ( | $a_usr_id, | |
$a_role_id | |||
) |
Definition at line 453 of file class.ilRbacSystem.php.
ilRbacSystem::checkAccess | ( | $a_operations, | |
$a_ref_id, | |||
$a_type = "" |
|||
) |
checkAccess represents the main method of the RBAC-system in ILIAS3 developers want to use With this method you check the permissions a use may have due to its roles on an specific object.
The first parameter are the operation(s) the user must have The second & third parameter specifies the object where the operation(s) may apply to The last parameter is only required, if you ask for the 'create' operation. Here you specify the object type which you want to create.
example: $rbacSystem->checkAccess("visible,read",23); Here you ask if the user is allowed to see ('visible') and access the object by reading it ('read'). The reference_id is 23 in the tree structure.
public
string | one or more operations, separated by commas (i.e.: visible,read,join) |
integer | the child_id in tree (usually a reference_id, no object_id !!) |
string | the type definition abbreviation (i.e.: frm,grp,crs) |
Definition at line 93 of file class.ilRbacSystem.php.
References $a_type, $ilBench, $ilUser, $result, and checkAccessOfUser().
Referenced by initMemberView().
ilRbacSystem::checkAccessOfUser | ( | $a_user_id, | |
$a_operations, | |||
$a_ref_id, | |||
$a_type = "" |
|||
) |
Definition at line 106 of file class.ilRbacSystem.php.
References $a_type, $GLOBALS, $ilDB, $ilLog, $ilUser, $r, $row, __filterOwnerPermissions(), ilRbacReview\_getOperationIdByName(), array, fetchAssignedRoles(), ilDBConstants\FETCHMODE_OBJECT, and ilDB\query().
Referenced by checkAccess().
ilRbacSystem::checkPermission | ( | $a_ref_id, | |
$a_rol_id, | |||
$a_operation | |||
) |
|
private |
Fetch assigned roles This method caches the assigned roles per user.
private
int | user id |
Definition at line 376 of file class.ilRbacSystem.php.
References $ilUser, and array.
Referenced by checkAccessOfUser(), and preloadRbacPaCache().
|
static |
Definition at line 55 of file class.ilRbacSystem.php.
Referenced by ilInitialisation\initAccessHandling().
ilRbacSystem::initMemberView | ( | ) |
Init member view.
Definition at line 405 of file class.ilRbacSystem.php.
References $_GET, array, checkAccess(), ilParticipants\getDefaultMemberRole(), and ilMemberViewSettings\getInstance().
ilRbacSystem::preloadRbacPaCache | ( | $a_ref_ids, | |
$a_user_id | |||
) |
Preload rbac_pa cache.
Definition at line 247 of file class.ilRbacSystem.php.
References $ilDB, $r, $ref_id, $row, array, fetchAssignedRoles(), ilDBConstants\FETCHMODE_OBJECT, and ilDB\query().
|
static |
ilRbacSystem::resetPACache | ( | $a_usr_id, | |
$a_ref_id | |||
) |
Definition at line 461 of file class.ilRbacSystem.php.
|
staticprivate |
Definition at line 29 of file class.ilRbacSystem.php.
|
staticprivate |
Definition at line 26 of file class.ilRbacSystem.php.
ilRbacSystem::$ilias |
Definition at line 23 of file class.ilRbacSystem.php.
Referenced by __construct().
|
staticprotected |
Definition at line 18 of file class.ilRbacSystem.php.
|
protected |
Definition at line 20 of file class.ilRbacSystem.php.
|
staticprotected |
Definition at line 22 of file class.ilRbacSystem.php.