ILIAS
release_8 Revision v8.19
|
class ilRbacSystem system function like checkAccess, addActiveRole ... More...
Public Member Functions | |
checkAccess (string $a_operations, int $a_ref_id, string $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 (int $a_user_id, string $a_operations, int $a_ref_id, string $a_type="") | |
preloadRbacPaCache (array $a_ref_ids, int $a_user_id) | |
checkPermission (int $a_ref_id, int $a_rol_id, string $a_operation) | |
check if a specific role has the permission '$a_operation' of an object More... | |
initMemberView () | |
addTemporaryRole (int $a_usr_id, int $a_role_id) | |
resetPACache (int $a_usr_id, int $a_ref_id) | |
Static Public Member Functions | |
static | getInstance () |
static | resetCaches () |
Reset internal caches. More... | |
Protected Member Functions | |
__construct () | |
Constructor. More... | |
filterOwnerPermissions (int $a_user_id, string $a_operations, int $a_ref_id) | |
Protected Attributes | |
array | $mem_view = [] |
ilObjUser | $user |
ilDBInterface | $db |
ilRbacReview | $review |
ilObjectDataCache | $objectDataCache |
ilTree | $tree |
GlobalHttpState | $http |
Factory | $refinery |
Static Protected Attributes | |
static ilRbacSystem | $instance = null |
static array | $user_role_cache = [] |
Private Member Functions | |
fetchAssignedRoles (int $a_usr_id, int $a_ref_id) | |
Fetch assigned roles This method caches the assigned roles per user. More... | |
Private Attributes | |
const | MAX_CACHE_ENTRIES = 1000 |
Static Private Attributes | |
static array | $_paCache = [] |
static array | $_checkAccessOfUserCache = [] |
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 33 of file class.ilRbacSystem.php.
|
protected |
Constructor.
Definition at line 60 of file class.ilRbacSystem.php.
References $DIC, ILIAS\FileDelivery\http(), ILIAS\Repository\refinery(), and ILIAS\Repository\user().
ilRbacSystem::addTemporaryRole | ( | int | $a_usr_id, |
int | $a_role_id | ||
) |
Definition at line 363 of file class.ilRbacSystem.php.
ilRbacSystem::checkAccess | ( | string | $a_operations, |
int | $a_ref_id, | ||
string | $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) |
int | 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 108 of file class.ilRbacSystem.php.
References checkAccessOfUser(), and ILIAS\Repository\user().
Referenced by ilHTLMEditorGUI\__construct(), ilLMPresentationGUI\__construct(), ilObjSurveyAccess\_checkAccess(), ilSurveyExecutionGUI\checkAuth(), ilRecommendedContentRoleConfigGUI\checkPushPermission(), ilContainerGUI\cloneAllObject(), ilContainerGUI\copyObject(), ilContainerGUI\cutObject(), ilContainerContentGUI\determineAdminCommands(), ilObjLearningHistorySettingsGUI\executeCommand(), ilObjCommentsSettingsGUI\executeCommand(), ilObjNotesSettingsGUI\executeCommand(), ilSurveyPageEditGUI\executeCommand(), ilRepositoryGUI\executeCommand(), ilAdministrationGUI\executeCommand(), ilObjTaxonomyAdministrationGUI\getAdminTabs(), ilObjLearningResourcesSettingsGUI\getAdminTabs(), ilObjMediaCastSettingsGUI\getAdminTabs(), ilObjBadgeAdministrationGUI\getAdminTabs(), ilObjLearningHistorySettingsGUI\getAdminTabs(), ilObjTaggingSettingsGUI\getAdminTabs(), ilObjRepositorySettingsGUI\getAdminTabs(), ilObjCommentsSettingsGUI\getAdminTabs(), ilObjNotesSettingsGUI\getAdminTabs(), ilAdministrationExplorerGUI\getChildsOfNode(), ilRepositoryExplorerGUI\getChildsOfNode(), ilAdminSubItemsTableGUI\getItems(), ilObjSurveyListGUI\getProperties(), ilObjFileBasedLMListGUI\getProperties(), ilObjSAHSLearningModuleListGUI\getProperties(), ilObjLearningModuleListGUI\getProperties(), ilObjRootFolderGUI\getTabs(), ilObjExternalToolsSettingsGUI\getTabs(), ilObjCategoryGUI\getTabs(), ilObjFolderGUI\getTabs(), ilContainerGUI\getTabs(), ilLMPresentationGUI\ilLMSubMenu(), ilPortfolioPageConfig\init(), initMemberView(), ilLocationInputGUI\insert(), ilRepositoryExplorer\isClickable(), ilRepositoryExplorerGUI\isNodeClickable(), ilAdministrationExplorerGUI\isNodeVisible(), ilExplorer\isVisible(), ilContainerGUI\linkObject(), ilRecommendedContentRoleConfigGUI\listItems(), ilObjCategoryGUI\listUsersObject(), SurveyQuestionGUI\material(), ilContainerGUI\pasteObject(), ilContainerGUI\performPasteIntoMultipleObjectsObject(), ilSurveyPhrasesGUI\phrases(), ilSurveyPageEditGUI\renderPage(), SurveySearch\search(), SurveyQuestionGUI\setQuestionTabsForClass(), ilSolutionExplorer\showChilds(), ilRepositoryExplorer\showChilds(), and ilInfoScreenGUI\showLearningProgress().
ilRbacSystem::checkAccessOfUser | ( | int | $a_user_id, |
string | $a_operations, | ||
int | $a_ref_id, | ||
string | $a_type = "" |
||
) |
Definition at line 113 of file class.ilRbacSystem.php.
References ilRbacReview\_getOperationIdByName(), fetchAssignedRoles(), ilDBConstants\FETCHMODE_OBJECT, filterOwnerPermissions(), and SYSTEM_ROLE_ID.
Referenced by ilObjGlossaryAccess\_checkAccess(), ilObjMediaCastAccess\_checkAccess(), ilObjWikiAccess\_checkAccess(), ilObjPortfolioTemplateAccess\_checkAccess(), ilObjBookingPoolAccess\_checkAccess(), ilObjSurveyAccess\_checkAccess(), checkAccess(), and ILIAS\Style\Content\Access\StyleAccessManager\checkWrite().
ilRbacSystem::checkPermission | ( | int | $a_ref_id, |
int | $a_rol_id, | ||
string | $a_operation | ||
) |
check if a specific role has the permission '$a_operation' of an object
Definition at line 249 of file class.ilRbacSystem.php.
References $query, $res, and ILIAS\Repository\int().
|
private |
Fetch assigned roles This method caches the assigned roles per user.
Definition at line 308 of file class.ilRbacSystem.php.
References ILIAS\Repository\user().
Referenced by checkAccessOfUser(), and preloadRbacPaCache().
|
protected |
Definition at line 271 of file class.ilRbacSystem.php.
References ILIAS\Repository\user().
Referenced by checkAccessOfUser().
|
static |
Definition at line 73 of file class.ilRbacSystem.php.
Referenced by ilInitialisation\initAccessHandling(), and ilRBACTest\testConstruct().
ilRbacSystem::initMemberView | ( | ) |
Definition at line 325 of file class.ilRbacSystem.php.
References $ref_id, ILIAS\LTI\ToolProvider\$settings, checkAccess(), ilParticipants\getDefaultMemberRole(), ilMemberViewSettings\getInstance(), ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().
ilRbacSystem::preloadRbacPaCache | ( | array | $a_ref_ids, |
int | $a_user_id | ||
) |
Definition at line 210 of file class.ilRbacSystem.php.
References $ref_id, fetchAssignedRoles(), ilDBConstants\FETCHMODE_OBJECT, and ILIAS\Repository\int().
|
static |
Reset internal caches.
Definition at line 84 of file class.ilRbacSystem.php.
Referenced by ilObjSessionGUI\unregisterObject().
ilRbacSystem::resetPACache | ( | int | $a_usr_id, |
int | $a_ref_id | ||
) |
Definition at line 370 of file class.ilRbacSystem.php.
|
staticprivate |
Definition at line 47 of file class.ilRbacSystem.php.
|
staticprivate |
Definition at line 44 of file class.ilRbacSystem.php.
|
protected |
Definition at line 50 of file class.ilRbacSystem.php.
|
protected |
Definition at line 54 of file class.ilRbacSystem.php.
|
staticprotected |
Definition at line 37 of file class.ilRbacSystem.php.
|
protected |
Definition at line 39 of file class.ilRbacSystem.php.
|
protected |
Definition at line 52 of file class.ilRbacSystem.php.
|
protected |
Definition at line 55 of file class.ilRbacSystem.php.
|
protected |
Definition at line 51 of file class.ilRbacSystem.php.
|
protected |
Definition at line 53 of file class.ilRbacSystem.php.
|
protected |
Definition at line 49 of file class.ilRbacSystem.php.
|
staticprotected |
Definition at line 41 of file class.ilRbacSystem.php.
|
private |
Definition at line 35 of file class.ilRbacSystem.php.