ILIAS
Release_4_2_x_branch Revision 61807
|
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. |
Static Public Member Functions | |
static | getInstance () |
Data Fields | |
$ilias |
Protected Member Functions | |
ilRbacSystem () | |
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 36 of file class.ilRbacSystem.php.
ilRbacSystem::__filterOwnerPermissions | ( | $a_user_id, | |
$a_operations, | |||
$a_ref_id | |||
) |
Definition at line 339 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 103 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 116 of file class.ilRbacSystem.php.
References $GLOBALS, $ilDB, $ilLog, $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 313 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 386 of file class.ilRbacSystem.php.
Referenced by checkAccessOfUser(), and preloadRbacPaCache().
|
static |
Definition at line 75 of file class.ilRbacSystem.php.
References $instance, and ilRbacSystem().
Referenced by ilInitialisation\initAccessHandling(), and initMemberView().
|
protected |
Constructor public.
Definition at line 55 of file class.ilRbacSystem.php.
References $ilDB, $ilErr, $ilias, if, and PEAR_ERROR_CALLBACK.
Referenced by getInstance().
ilRbacSystem::initMemberView | ( | ) |
Init member view.
Definition at line 415 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 261 of file class.ilRbacSystem.php.
References $ilDB, $ref_id, $row, DB_FETCHMODE_OBJECT, fetchAssignedRoles(), and ilDB\query().
|
staticprivate |
Definition at line 49 of file class.ilRbacSystem.php.
|
staticprivate |
Definition at line 46 of file class.ilRbacSystem.php.
ilRbacSystem::$ilias |
Definition at line 43 of file class.ilRbacSystem.php.
Referenced by ilRbacSystem().
|
staticprotected |
Definition at line 38 of file class.ilRbacSystem.php.
Referenced by getInstance().
|
protected |
Definition at line 40 of file class.ilRbacSystem.php.
|
staticprotected |
Definition at line 42 of file class.ilRbacSystem.php.