ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
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
| ||||||||||||||||||||||
doActivationCheck ($a_permission, $a_cmd, $a_ref_id, $a_user_id, $a_all=false) | ||||||||||||||||||||||
check for course activation
| ||||||||||||||||||||||
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
| ||||||||||||||||||||||
doLicenseCheck ($a_permission, $a_cmd, $a_ref_id, $a_user_id, $a_obj_id, $a_type) | ||||||||||||||||||||||
check for available licenses
| ||||||||||||||||||||||
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) | ||||||||||||||||||||||
| ||||||||||||||||||||||
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 $rbacsystem, array, and ilLoggerFactory\getLogger().
ilAccess::addInfoItem | ( | $a_type, | |
$a_text, | |||
$a_data = "" |
|||
) |
add an info item to current info object
Implements ilRBACAccessHandler.
Definition at line 232 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 240 of file class.ilAccess.php.
References $a_type, $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 250 of file class.ilAccess.php.
References $a_type, $ilBench, $lng, ilObject\_lookupObjId(), ilObject\_lookupType(), doActivationCheck(), doCacheCheck(), doConditionCheck(), doLicenseCheck(), doPathCheck(), doRBACCheck(), doStatusCheck(), doTreeCheck(), IL_NO_PERMISSION, setPreventCachingLastResult(), and storeAccessResult().
Referenced by checkAccess(), doActivationCheck(), 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 842 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 850 of file class.ilAccess.php.
References ilOrgUnitPositionAccess\checkRbacOrPositionPermissionAccess().
ilAccess::clear | ( | ) |
Implements ilRBACAccessHandler.
Definition at line 786 of file class.ilAccess.php.
References array.
ilAccess::doActivationCheck | ( | $a_permission, | |
$a_cmd, | |||
$a_ref_id, | |||
$a_user_id, | |||
$a_all = false |
|||
) |
check for course activation
string | $a_permission | |
string | $a_cmd | |
int | $a_ref_id | |
int | $a_user_id | |
bool | $a_all |
Implements ilRBACAccessHandler.
Definition at line 551 of file class.ilAccess.php.
References $ilBench, $ilUser, checkAccessOfUser(), ilMemberViewSettings\getInstance(), ilObjectActivation\getItem(), time, and ilObjectActivation\TIMINGS_ACTIVATION.
Referenced by checkAccessOfUser().
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 387 of file class.ilAccess.php.
References $ilBench, array, 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 634 of file class.ilAccess.php.
References $a_type, $condition, $ilBench, $lng, ilConditionHandler\_checkAllConditionsOfTarget(), ilConditionHandler\_getConditionsOfTarget(), ilObject\_lookupTitle(), checkAccessOfUser(), IL_MISSING_PRECONDITION, and ilConditionHandler\lookupHiddenStatusByTarget().
Referenced by checkAccessOfUser().
ilAccess::doLicenseCheck | ( | $a_permission, | |
$a_cmd, | |||
$a_ref_id, | |||
$a_user_id, | |||
$a_obj_id, | |||
$a_type | |||
) |
check for available licenses
$a_permission | |
$a_cmd | |
$a_ref_id | |
$a_user_id | |
$a_obj_id | |
$a_type |
Implements ilRBACAccessHandler.
Definition at line 745 of file class.ilAccess.php.
References $a_type, $lng, ilLicenseAccess\_checkAccess(), ilLicenseAccess\_isEnabled(), array, and storeAccessResult().
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 509 of file class.ilAccess.php.
References $id, $ilBench, $lng, $path, $tree, checkAccessOfUser(), and IL_NO_PARENT_ACCESS.
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 467 of file class.ilAccess.php.
References $a_type, $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 690 of file class.ilAccess.php.
References $a_type, $ilBench, $location, array, 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 412 of file class.ilAccess.php.
References $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 796 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 858 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 866 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 874 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 810 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 818 of file class.ilAccess.php.
References ilOrgUnitPositionAccess\filterUserIdsForUsersPositionsAndPermission().
ilAccess::getInfo | ( | ) |
get last info object
Implements ilRBACAccessHandler.
Definition at line 357 of file class.ilAccess.php.
References array.
ilAccess::getPreventCachingLastResult | ( | ) |
Get prevent caching last result.
Implements ilRBACAccessHandler.
Definition at line 152 of file class.ilAccess.php.
Referenced by storeAccessResult().
ilAccess::getResultAll | ( | $a_ref_id = "" | ) |
Implements ilRBACAccessHandler.
Definition at line 375 of file class.ilAccess.php.
References $results.
ilAccess::getResultLast | ( | ) |
get last info object
Implements ilRBACAccessHandler.
Definition at line 368 of file class.ilAccess.php.
ilAccess::getResults | ( | ) |
Implements ilRBACAccessHandler.
Definition at line 217 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 160 of file class.ilAccess.php.
References $ilUser.
Referenced by doCacheCheck().
ilAccess::hasCurrentUserAnyPositionAccess | ( | $ref_id | ) |
int | $ref_id |
Implements ilOrgUnitPositionAccessHandler.
Definition at line 882 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 890 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 826 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 834 of file class.ilAccess.php.
References ilOrgUnitPositionAccess\isUserBasedOnPositionsAllowedTo().
ilAccess::readCache | ( | $a_secs = 0 | ) |
Implements ilRBACAccessHandler.
Definition at line 197 of file class.ilAccess.php.
References $ilDB, $ilUser, $query, ilDBConstants\FETCHMODE_ASSOC, and time.
ilAccess::setPreventCachingLastResult | ( | $a_val | ) |
Set prevent caching last result.
boolean | true if last result should not be cached |
Implements ilRBACAccessHandler.
Definition at line 144 of file class.ilAccess.php.
Referenced by checkAccessOfUser().
ilAccess::setResults | ( | $a_results | ) |
Implements ilRBACAccessHandler.
Definition at line 224 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 113 of file class.ilAccess.php.
References $current_info, $ilUser, array, and getPreventCachingLastResult().
Referenced by checkAccessOfUser(), doLicenseCheck(), doRBACCheck(), doStatusCheck(), and doTreeCheck().
ilAccess::storeCache | ( | ) |
Implements ilRBACAccessHandler.
Definition at line 181 of file class.ilAccess.php.
References $ilDB, $ilUser, $query, $res, array, and time.
|
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().