ILIAS
Release_3_10_x_branch Revision 61812
|
class ilRbacSystem system function like checkAccess, addActiveRole ... More...
Public Member Functions | |
ilRbacSystem () | |
Constructor public. | |
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="") | |
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) |
Data Fields | |
$ilias |
Static Protected Attributes | |
static | $user_role_cache = array() |
Private Member Functions | |
fetchAssignedRoles ($a_usr_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 36 of file class.ilRbacSystem.php.
ilRbacSystem::__filterOwnerPermissions | ( | $a_user_id, | |
$a_operations, | |||
$a_ref_id | |||
) |
Definition at line 268 of file class.ilRbacSystem.php.
Referenced by checkAccessOfUser().
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 90 of file class.ilRbacSystem.php.
References $ilBench, $result, and checkAccessOfUser().
ilRbacSystem::checkAccessOfUser | ( | $a_user_id, | |
$a_operations, | |||
$a_ref_id, | |||
$a_type = "" |
|||
) |
Definition at line 103 of file class.ilRbacSystem.php.
References __filterOwnerPermissions(), ilRbacReview\_getOperationIdByName(), DB_FETCHMODE_OBJECT, and fetchAssignedRoles().
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 239 of file class.ilRbacSystem.php.
References DB_FETCHMODE_OBJECT.
|
private |
Fetch assigned roles This method caches the assigned roles per user.
private
int | user id |
Definition at line 303 of file class.ilRbacSystem.php.
Referenced by checkAccessOfUser().
ilRbacSystem::ilRbacSystem | ( | ) |
Constructor public.
Definition at line 51 of file class.ilRbacSystem.php.
References $ilErr, $ilias, and if.
|
staticprivate |
Definition at line 45 of file class.ilRbacSystem.php.
|
staticprivate |
Definition at line 42 of file class.ilRbacSystem.php.
ilRbacSystem::$ilias |
Definition at line 39 of file class.ilRbacSystem.php.
Referenced by ilRbacSystem().
|
staticprotected |
Definition at line 38 of file class.ilRbacSystem.php.