ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Class ilAccessHandler. More...
Public Member Functions | ||||||||||||||||||||||
__construct () | ||||||||||||||||||||||
storeAccessResult ($a_permission, $a_cmd, $a_ref_id, $a_access_granted, $a_user_id="", $a_info="") | ||||||||||||||||||||||
store access resultprivate
| ||||||||||||||||||||||
setPreventCachingLastResult ($a_val) | ||||||||||||||||||||||
Set prevent caching last result.
| ||||||||||||||||||||||
getPreventCachingLastResult () | ||||||||||||||||||||||
Get prevent caching last result.
| ||||||||||||||||||||||
getStoredAccessResult ($a_permission, $a_cmd, $a_ref_id, $a_user_id="") | ||||||||||||||||||||||
get stored access resultprivate
| ||||||||||||||||||||||
storeCache () | ||||||||||||||||||||||
readCache ($a_secs=0) | ||||||||||||||||||||||
getResults () | ||||||||||||||||||||||
setResults ($a_results) | ||||||||||||||||||||||
addInfoItem ($a_type, $a_text, $a_data="") | ||||||||||||||||||||||
add an info item to current info object More... | ||||||||||||||||||||||
checkAccess ($a_permission, $a_cmd, $a_ref_id, $a_type="", $a_obj_id="", $a_tree_id="") | ||||||||||||||||||||||
check access for an object (provide $a_type and $a_obj_id if available for better performance)
| ||||||||||||||||||||||
checkAccessOfUser ($a_user_id, $a_permission, $a_cmd, $a_ref_id, $a_type="", $a_obj_id="", $a_tree_id="") | ||||||||||||||||||||||
check access for an object (provide $a_type and $a_obj_id if available for better performance)
| ||||||||||||||||||||||
getInfo () | ||||||||||||||||||||||
get last info object More... | ||||||||||||||||||||||
getResultLast () | ||||||||||||||||||||||
get last info object More... | ||||||||||||||||||||||
getResultAll ($a_ref_id="") | ||||||||||||||||||||||
doCacheCheck ($a_permission, $a_cmd, $a_ref_id, $a_user_id) | ||||||||||||||||||||||
look if result for current query is already in cache
| ||||||||||||||||||||||
doTreeCheck ($a_permission, $a_cmd, $a_ref_id, $a_user_id) | ||||||||||||||||||||||
check if object is in tree and not deleted
| ||||||||||||||||||||||
doRBACCheck ($a_permission, $a_cmd, $a_ref_id, $a_user_id, $a_type) | ||||||||||||||||||||||
rbac check for current object -> type should be used for create permission
| ||||||||||||||||||||||
doPathCheck ($a_permission, $a_cmd, $a_ref_id, $a_user_id, $a_all=false) | ||||||||||||||||||||||
check read permission for all parents
| ||||||||||||||||||||||
doConditionCheck ($a_permission, $a_cmd, $a_ref_id, $a_user_id, $a_obj_id, $a_type) | ||||||||||||||||||||||
condition check (currently only implemented for read permission)
| ||||||||||||||||||||||
doStatusCheck ($a_permission, $a_cmd, $a_ref_id, $a_user_id, $a_obj_id, $a_type) | ||||||||||||||||||||||
object type specific check
| ||||||||||||||||||||||
clear () | ||||||||||||||||||||||
enable ($a_str, $a_bool) | ||||||||||||||||||||||
| ||||||||||||||||||||||
filterUserIdsForCurrentUsersPositionsAndPermission (array $user_ids, $permission) | ||||||||||||||||||||||
| ||||||||||||||||||||||
filterUserIdsForUsersPositionsAndPermission (array $user_ids, $for_user_id, $permission) | ||||||||||||||||||||||
| ||||||||||||||||||||||
isCurrentUserBasedOnPositionsAllowedTo ($permission, array $on_user_ids) | ||||||||||||||||||||||
| ||||||||||||||||||||||
isUserBasedOnPositionsAllowedTo ($which_user_id, $permission, array $on_user_ids) | ||||||||||||||||||||||
| ||||||||||||||||||||||
checkPositionAccess ($pos_perm, $ref_id) | ||||||||||||||||||||||
| ||||||||||||||||||||||
checkRbacOrPositionPermissionAccess ($rbac_perm, $pos_perm, $ref_id) | ||||||||||||||||||||||
| ||||||||||||||||||||||
filterUserIdsByPositionOfCurrentUser ($pos_perm, $ref_id, array $user_ids) | ||||||||||||||||||||||
| ||||||||||||||||||||||
filterUserIdsByPositionOfUser ($user_id, $pos_perm, $ref_id, array $user_ids) | ||||||||||||||||||||||
| ||||||||||||||||||||||
filterUserIdsByRbacOrPositionOfCurrentUser ($rbac_perm, $pos_perm, $ref_id, array $user_ids) | ||||||||||||||||||||||
| ||||||||||||||||||||||
hasCurrentUserAnyPositionAccess ($ref_id) | ||||||||||||||||||||||
| ||||||||||||||||||||||
hasUserRBACorAnyPositionAccess ($rbac_perm, $ref_id) | ||||||||||||||||||||||
| ||||||||||||||||||||||
Public Member Functions inherited from ilRBACAccessHandler | ||||||||||||||||||||||
doActivationCheck ($a_permission, $a_cmd, $a_ref_id, $a_user_id, $a_obj_id, $a_type) | ||||||||||||||||||||||
check for activation and centralized offline status. More... | ||||||||||||||||||||||
Protected Attributes | |
$ilOrgUnitPositionAccess | |
$obj_tree_cache | |
$obj_type_cache | |
$obj_id_cache | |
$status | |
$path | |
$condition | |
$tree | |
$rbac | |
$cache | |
$current_info | |
$results | |
$rbacsystem | |
$stored_rbac_access = array() | |
$ac_logger | |
Class ilAccessHandler.
Checks access for ILIAS objects
Definition at line 19 of file class.ilAccess.php.
ilAccess::__construct | ( | ) |
Definition at line 85 of file class.ilAccess.php.
References $DIC, $rbacsystem, and ilLoggerFactory\getLogger().
ilAccess::addInfoItem | ( | $a_type, | |
$a_text, | |||
$a_data = "" |
|||
) |
add an info item to current info object
Implements ilRBACAccessHandler.
Definition at line 244 of file class.ilAccess.php.
References $a_type.
ilAccess::checkAccess | ( | $a_permission, | |
$a_cmd, | |||
$a_ref_id, | |||
$a_type = "" , |
|||
$a_obj_id = "" , |
|||
$a_tree_id = "" |
|||
) |
check access for an object (provide $a_type and $a_obj_id if available for better performance)
string | $a_permission | |
string | $a_cmd | |
int | $a_ref_id | |
string | $a_type | (optional) |
int | $a_obj_id | (optional) |
int | $a_tree_id | (optional) |
Implements ilRBACAccessHandler.
Definition at line 252 of file class.ilAccess.php.
References $a_type, $DIC, $ilUser, and checkAccessOfUser().
Referenced by ilLocalUserGUI\__checkGlobalRoles(), ilLocalUserGUI\__showRolesTable(), ilOrgUnitStaffGUI\addOtherRoles(), ilOrgUnitStaffGUI\addStaff(), ilObjStudyProgrammeGUI\addToNavigationHistory(), ilLocalUserGUI\assignRoles(), ilLocalUserGUI\assignSave(), ilObjStudyProgrammeGUI\checkAccess(), ilLocalUserGUI\checkPermission(), ilOrgUnitSimpleImportGUI\chooseImport(), ilOrgUnitStaffGUI\confirmRemoveUser(), ilObjStudyProgrammeGUI\editAdvancedSettings(), ilObjOrgUnitGUI\editAdvancedSettings(), ilObjOrgUnitGUI\editSettings(), ilObjOrgUnitGUI\executeCommand(), ilOrgUnitStaffGUI\fromEmployeeToSuperior(), ilOrgUnitStaffGUI\fromSuperiorToEmployee(), ilObjStudyProgrammeAdminGUI\initFormSettings(), ilOrgUnitStaffGUI\removeFromEmployees(), ilOrgUnitStaffGUI\removeFromRole(), ilOrgUnitStaffGUI\removeFromSuperiors(), ilOrgUnitStaffGUI\setTabs(), ilOrgUnitStaffGUI\showOtherRoles(), ilOrgUnitStaffGUI\showStaff(), ilObjStudyProgrammeGUI\updateAdvancedSettings(), ilObjOrgUnitGUI\updateAdvancedSettings(), and ilObjOrgUnitGUI\updateSettings().
ilAccess::checkAccessOfUser | ( | $a_user_id, | |
$a_permission, | |||
$a_cmd, | |||
$a_ref_id, | |||
$a_type = "" , |
|||
$a_obj_id = "" , |
|||
$a_tree_id = "" |
|||
) |
check access for an object (provide $a_type and $a_obj_id if available for better performance)
integer | $a_user_id | |
string | $a_permission | |
string | $a_cmd | |
int | $a_ref_id | |
string | $a_type | (optional) |
int | $a_obj_id | (optional) |
int | $a_tree_id | (optional) |
Implements ilRBACAccessHandler.
Definition at line 264 of file class.ilAccess.php.
References $a_type, $DIC, $ilBench, $lng, ilObject\_lookupObjId(), ilObject\_lookupType(), ilRBACAccessHandler\doActivationCheck(), doCacheCheck(), doConditionCheck(), doPathCheck(), doRBACCheck(), doStatusCheck(), doTreeCheck(), IL_NO_PERMISSION, setPreventCachingLastResult(), and storeAccessResult().
Referenced by checkAccess(), doConditionCheck(), doPathCheck(), and ilSearchResult\filter().
ilAccess::checkPositionAccess | ( | $pos_perm, | |
$ref_id | |||
) |
string | $pos_perm | |
int | $ref_id | Reference-ID of the desired Object in the tree |
Implements ilOrgUnitPositionAccessHandler.
Definition at line 856 of file class.ilAccess.php.
References ilOrgUnitPositionAccess\checkPositionAccess().
ilAccess::checkRbacOrPositionPermissionAccess | ( | $rbac_perm, | |
$pos_perm, | |||
$ref_id | |||
) |
string | $rbac_perm | |
string | $pos_perm | See the list of available permissions in interface ilOrgUnitPositionAccessHandler |
int | $ref_id | Reference-ID of the desired Object in the tree |
Implements ilOrgUnitPositionAndRBACAccessHandler.
Definition at line 864 of file class.ilAccess.php.
References ilOrgUnitPositionAccess\checkRbacOrPositionPermissionAccess().
ilAccess::clear | ( | ) |
ilAccess::doCacheCheck | ( | $a_permission, | |
$a_cmd, | |||
$a_ref_id, | |||
$a_user_id | |||
) |
look if result for current query is already in cache
string | $a_permission | |
string | $a_cmd | |
int | $a_ref_id | |
int | $a_user_id |
Implements ilRBACAccessHandler.
Definition at line 406 of file class.ilAccess.php.
References $DIC, $ilBench, and getStoredAccessResult().
Referenced by checkAccessOfUser().
ilAccess::doConditionCheck | ( | $a_permission, | |
$a_cmd, | |||
$a_ref_id, | |||
$a_user_id, | |||
$a_obj_id, | |||
$a_type | |||
) |
condition check (currently only implemented for read permission)
string | $a_permission | |
string | $a_cmd | |
int | $a_ref_id | |
int | $a_user_id | |
int | $a_obj_id | |
string | $a_type |
Implements ilRBACAccessHandler.
Definition at line 682 of file class.ilAccess.php.
References $a_type, $condition, $DIC, $ilBench, $lng, ilConditionHandler\_checkAllConditionsOfTarget(), ilObject\_lookupTitle(), checkAccessOfUser(), and IL_MISSING_PRECONDITION.
Referenced by checkAccessOfUser().
ilAccess::doPathCheck | ( | $a_permission, | |
$a_cmd, | |||
$a_ref_id, | |||
$a_user_id, | |||
$a_all = false |
|||
) |
check read permission for all parents
string | $a_permission | |
string | $a_cmd | |
int | $a_ref_id | |
int | $a_user_id | |
bool | $a_all |
Implements ilRBACAccessHandler.
Definition at line 539 of file class.ilAccess.php.
References $a_type, $DIC, $id, $ilBench, $ilUser, $lng, $path, $tree, checkAccessOfUser(), ilRBACAccessHandler\doActivationCheck(), ilMemberViewSettings\getInstance(), ilObjectActivation\getItem(), IL_NO_PARENT_ACCESS, ilObject\lookupOfflineStatus(), and ilObjectActivation\TIMINGS_ACTIVATION.
Referenced by checkAccessOfUser().
ilAccess::doRBACCheck | ( | $a_permission, | |
$a_cmd, | |||
$a_ref_id, | |||
$a_user_id, | |||
$a_type | |||
) |
rbac check for current object -> type should be used for create permission
string | $a_permission | |
string | $a_cmd | |
int | $a_ref_id | |
int | $a_user_id | |
string | $a_type |
Implements ilRBACAccessHandler.
Definition at line 492 of file class.ilAccess.php.
References $a_type, $DIC, $ilBench, $ilErr, $ilLog, $lng, $message, IL_NO_PERMISSION, and storeAccessResult().
Referenced by checkAccessOfUser().
ilAccess::doStatusCheck | ( | $a_permission, | |
$a_cmd, | |||
$a_ref_id, | |||
$a_user_id, | |||
$a_obj_id, | |||
$a_type | |||
) |
object type specific check
string | $a_permission | |
string | $a_cmd | |
int | $a_ref_id | |
int | $a_user_id | |
int | $a_obj_id | |
string | $a_type |
Implements ilRBACAccessHandler.
Definition at line 741 of file class.ilAccess.php.
References $a_type, $DIC, $ilBench, $location, and storeAccessResult().
Referenced by checkAccessOfUser().
ilAccess::doTreeCheck | ( | $a_permission, | |
$a_cmd, | |||
$a_ref_id, | |||
$a_user_id | |||
) |
check if object is in tree and not deleted
string | $a_permission | |
string | $a_cmd | |
int | $a_ref_id | |
int | $a_user_id |
Implements ilRBACAccessHandler.
Definition at line 433 of file class.ilAccess.php.
References $DIC, $ilBench, $lng, $tree, IL_DELETED, IL_NO_PERMISSION, and storeAccessResult().
Referenced by checkAccessOfUser().
ilAccess::enable | ( | $a_str, | |
$a_bool | |||
) |
$a_str | |
$a_bool |
Implements ilRBACAccessHandler.
Definition at line 810 of file class.ilAccess.php.
ilAccess::filterUserIdsByPositionOfCurrentUser | ( | $pos_perm, | |
$ref_id, | |||
array | $user_ids | ||
) |
string | $pos_perm | |
int | $ref_id | |
int[] | $user_ids |
Implements ilOrgUnitPositionAccessHandler.
Definition at line 872 of file class.ilAccess.php.
References ilOrgUnitPositionAccess\filterUserIdsByPositionOfCurrentUser().
ilAccess::filterUserIdsByPositionOfUser | ( | $user_id, | |
$pos_perm, | |||
$ref_id, | |||
array | $user_ids | ||
) |
int | $user_id | |
string | $pos_perm | |
int | $ref_id | |
int[] | $user_ids |
Implements ilOrgUnitPositionAccessHandler.
Definition at line 880 of file class.ilAccess.php.
References ilOrgUnitPositionAccess\filterUserIdsByPositionOfUser().
ilAccess::filterUserIdsByRbacOrPositionOfCurrentUser | ( | $rbac_perm, | |
$pos_perm, | |||
$ref_id, | |||
array | $user_ids | ||
) |
string | $rbac_perm | |
string | $pos_perm | See the list of available permissions in interface ilOrgUnitPositionAccessHandler |
int | $ref_id | Reference-ID of the desired Object in the tree |
int[] | $user_ids |
Implements ilOrgUnitPositionAndRBACAccessHandler.
Definition at line 888 of file class.ilAccess.php.
References ilOrgUnitPositionAccess\filterUserIdsByRbacOrPositionOfCurrentUser().
ilAccess::filterUserIdsForCurrentUsersPositionsAndPermission | ( | array | $user_ids, |
$permission | |||
) |
int[] | $user_ids List of ILIAS-User-IDs which shall be filtered | |
string | $permission |
Implements ilOrgUnitPositionAccessHandler.
Definition at line 824 of file class.ilAccess.php.
References ilOrgUnitPositionAccess\filterUserIdsForCurrentUsersPositionsAndPermission().
ilAccess::filterUserIdsForUsersPositionsAndPermission | ( | array | $user_ids, |
$for_user_id, | |||
$permission | |||
) |
int[] | $user_ids List of ILIAS-User-IDs which shall be filtered | |
int | $for_user_id | |
string | $permission |
Implements ilOrgUnitPositionAccessHandler.
Definition at line 832 of file class.ilAccess.php.
References ilOrgUnitPositionAccess\filterUserIdsForUsersPositionsAndPermission().
ilAccess::getInfo | ( | ) |
get last info object
Implements ilRBACAccessHandler.
Definition at line 376 of file class.ilAccess.php.
ilAccess::getPreventCachingLastResult | ( | ) |
Get prevent caching last result.
Implements ilRBACAccessHandler.
Definition at line 156 of file class.ilAccess.php.
Referenced by storeAccessResult().
ilAccess::getResultAll | ( | $a_ref_id = "" | ) |
Implements ilRBACAccessHandler.
Definition at line 394 of file class.ilAccess.php.
References $results.
ilAccess::getResultLast | ( | ) |
get last info object
Implements ilRBACAccessHandler.
Definition at line 387 of file class.ilAccess.php.
ilAccess::getResults | ( | ) |
Implements ilRBACAccessHandler.
Definition at line 229 of file class.ilAccess.php.
References $results.
ilAccess::getStoredAccessResult | ( | $a_permission, | |
$a_cmd, | |||
$a_ref_id, | |||
$a_user_id = "" |
|||
) |
get stored access resultprivate
string | $a_permission | permission |
string | $a_cmd | command string |
int | $a_ref_id | reference id |
int | $a_user_id | user id (if no id passed, current user id) |
Implements ilRBACAccessHandler.
Definition at line 164 of file class.ilAccess.php.
Referenced by doCacheCheck().
ilAccess::hasCurrentUserAnyPositionAccess | ( | $ref_id | ) |
int | $ref_id |
Implements ilOrgUnitPositionAccessHandler.
Definition at line 896 of file class.ilAccess.php.
References ilOrgUnitPositionAccess\hasCurrentUserAnyPositionAccess().
ilAccess::hasUserRBACorAnyPositionAccess | ( | $rbac_perm, | |
$ref_id | |||
) |
string | $rbac_perm | |
int | $ref_id |
Implements ilOrgUnitPositionAndRBACAccessHandler.
Definition at line 904 of file class.ilAccess.php.
References ilOrgUnitPositionAccess\hasUserRBACorAnyPositionAccess().
ilAccess::isCurrentUserBasedOnPositionsAllowedTo | ( | $permission, | |
array | $on_user_ids | ||
) |
string | $permission | |
int[] | $on_user_ids List of ILIAS-User-IDs |
Implements ilOrgUnitPositionAccessHandler.
Definition at line 840 of file class.ilAccess.php.
References ilOrgUnitPositionAccess\isCurrentUserBasedOnPositionsAllowedTo().
ilAccess::isUserBasedOnPositionsAllowedTo | ( | $which_user_id, | |
$permission, | |||
array | $on_user_ids | ||
) |
int | $which_user_id | Permission check for this ILIAS-User-ID |
string | $permission | |
int[] | $on_user_ids List of ILIAS-User-IDs |
Implements ilOrgUnitPositionAccessHandler.
Definition at line 848 of file class.ilAccess.php.
References ilOrgUnitPositionAccess\isUserBasedOnPositionsAllowedTo().
ilAccess::readCache | ( | $a_secs = 0 | ) |
Implements ilRBACAccessHandler.
Definition at line 206 of file class.ilAccess.php.
References $DIC, $ilDB, $ilUser, $query, and ilDBConstants\FETCHMODE_ASSOC.
ilAccess::setPreventCachingLastResult | ( | $a_val | ) |
Set prevent caching last result.
boolean | true if last result should not be cached |
Implements ilRBACAccessHandler.
Definition at line 148 of file class.ilAccess.php.
Referenced by checkAccessOfUser().
ilAccess::setResults | ( | $a_results | ) |
Implements ilRBACAccessHandler.
Definition at line 236 of file class.ilAccess.php.
ilAccess::storeAccessResult | ( | $a_permission, | |
$a_cmd, | |||
$a_ref_id, | |||
$a_access_granted, | |||
$a_user_id = "" , |
|||
$a_info = "" |
|||
) |
store access resultprivate
string | $a_permission | permission |
string | $a_cmd | command string |
int | $a_ref_id | reference id |
boolean | $a_access_granted | true if access is granted |
int | $a_user_id | user id (if no id passed, current user id) |
Implements ilRBACAccessHandler.
Definition at line 115 of file class.ilAccess.php.
References $current_info, $DIC, $ilUser, and getPreventCachingLastResult().
Referenced by checkAccessOfUser(), doRBACCheck(), doStatusCheck(), and doTreeCheck().
ilAccess::storeCache | ( | ) |
Implements ilRBACAccessHandler.
Definition at line 187 of file class.ilAccess.php.
References $DIC, $ilDB, $ilUser, $query, and $res.
|
protected |
Definition at line 83 of file class.ilAccess.php.
|
protected |
Definition at line 61 of file class.ilAccess.php.
|
protected |
Definition at line 49 of file class.ilAccess.php.
Referenced by doConditionCheck().
|
protected |
Definition at line 65 of file class.ilAccess.php.
Referenced by storeAccessResult().
|
protected |
Definition at line 25 of file class.ilAccess.php.
|
protected |
Definition at line 37 of file class.ilAccess.php.
|
protected |
Definition at line 29 of file class.ilAccess.php.
|
protected |
Definition at line 33 of file class.ilAccess.php.
|
protected |
Definition at line 45 of file class.ilAccess.php.
Referenced by doPathCheck().
|
protected |
Definition at line 57 of file class.ilAccess.php.
|
protected |
Definition at line 73 of file class.ilAccess.php.
Referenced by __construct().
|
protected |
Definition at line 69 of file class.ilAccess.php.
Referenced by getResultAll(), and getResults().
|
protected |
Definition at line 41 of file class.ilAccess.php.
|
protected |
Definition at line 77 of file class.ilAccess.php.
|
protected |
Definition at line 53 of file class.ilAccess.php.
Referenced by doPathCheck(), and doTreeCheck().