ILIAS
Release_5_0_x_branch Revision 61816
|
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. | |
checkAccessOfUser ($a_user_id, $a_operations, $a_ref_id, $a_type="") | |
preloadRbacPaCache ($a_ref_ids, $a_user_id) | |
Preload rbac_pa cache. | |
checkPermission ($a_ref_id, $a_rol_id, $a_operation) | |
check if a specific role has the permission '$a_operation' of an object public | |
__filterOwnerPermissions ($a_user_id, $a_operations, $a_ref_id) | |
initMemberView () | |
Init member view. | |
addTemporaryRole ($a_usr_id, $a_role_id) | |
resetPACache ($a_usr_id, $a_ref_id) |
Static Public Member Functions | |
static | getInstance () |
Data Fields | |
$ilias |
Protected Member Functions | |
__construct () | |
Constructor public. |
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. |
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, if, and PEAR_ERROR_CALLBACK.
ilRbacSystem::__filterOwnerPermissions | ( | $a_user_id, | |
$a_operations, | |||
$a_ref_id | |||
) |
Definition at line 320 of file class.ilRbacSystem.php.
References $ilUser.
Referenced by checkAccessOfUser().
ilRbacSystem::addTemporaryRole | ( | $a_usr_id, | |
$a_role_id | |||
) |
Definition at line 425 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 83 of file class.ilRbacSystem.php.
References $ilBench, $ilUser, $result, and checkAccessOfUser().
ilRbacSystem::checkAccessOfUser | ( | $a_user_id, | |
$a_operations, | |||
$a_ref_id, | |||
$a_type = "" |
|||
) |
Definition at line 96 of file class.ilRbacSystem.php.
References $GLOBALS, $ilDB, $ilLog, $ilUser, $row, __filterOwnerPermissions(), ilRbacReview\_getOperationIdByName(), DB_FETCHMODE_OBJECT, fetchAssignedRoles(), and ilDB\query().
Referenced by checkAccess().
ilRbacSystem::checkPermission | ( | $a_ref_id, | |
$a_rol_id, | |||
$a_operation | |||
) |
check if a specific role has the permission '$a_operation' of an object public
integer | reference id of object |
integer | role id |
string | the permission to check |
Definition at line 294 of file class.ilRbacSystem.php.
References $ilDB, $query, $res, and $row.
|
private |
Fetch assigned roles This method caches the assigned roles per user.
private
int | user id |
Definition at line 367 of file class.ilRbacSystem.php.
References $ilUser.
Referenced by checkAccessOfUser(), and preloadRbacPaCache().
|
static |
Definition at line 55 of file class.ilRbacSystem.php.
References $instance.
Referenced by ilInitialisation\initAccessHandling(), and initMemberView().
ilRbacSystem::initMemberView | ( | ) |
Init member view.
Definition at line 396 of file class.ilRbacSystem.php.
References $_GET, ilParticipants\getDefaultMemberRole(), and getInstance().
ilRbacSystem::preloadRbacPaCache | ( | $a_ref_ids, | |
$a_user_id | |||
) |
Preload rbac_pa cache.
@return |
Definition at line 238 of file class.ilRbacSystem.php.
References $ilDB, $ref_id, $row, DB_FETCHMODE_OBJECT, fetchAssignedRoles(), and ilDB\query().
ilRbacSystem::resetPACache | ( | $a_usr_id, | |
$a_ref_id | |||
) |
Definition at line 433 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.
Referenced by getInstance().
|
protected |
Definition at line 20 of file class.ilRbacSystem.php.
|
staticprotected |
Definition at line 22 of file class.ilRbacSystem.php.