|
ILIAS
release_10 Revision v10.1-43-ga1241a92c2f
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...
Inheritance diagram for ilAccess:
Collaboration diagram for ilAccess:Public Member Functions | |||||||||||||
| __construct () | |||||||||||||
| storeAccessResult (string $a_permission, string $a_cmd, int $a_ref_id, bool $a_access_granted, ?int $a_user_id=null, ?ilAccessInfo $a_info=null) | |||||||||||||
| store access result More... | |||||||||||||
| setPreventCachingLastResult (bool $a_val) | |||||||||||||
| Set prevent caching last result. More... | |||||||||||||
| getPreventCachingLastResult () | |||||||||||||
| Get prevent caching last result. More... | |||||||||||||
| getStoredAccessResult (string $a_permission, string $a_cmd, int $a_ref_id, ?int $a_user_id=null) | |||||||||||||
get stored access result
| |||||||||||||
| getResults () | |||||||||||||
| setResults (array $a_results) | |||||||||||||
| addInfoItem (string $a_type, string $a_text, string $a_data="") | |||||||||||||
| add an info item to current info object More... | |||||||||||||
| checkAccess (string $a_permission, string $a_cmd, int $a_ref_id, string $a_type="", ?int $a_obj_id=null, ?int $a_tree_id=null) | |||||||||||||
| check access for an object (provide $a_type and $a_obj_id if available for better performance) More... | |||||||||||||
| checkAccessOfUser (int $a_user_id, string $a_permission, string $a_cmd, int $a_ref_id, string $a_type="", ?int $a_obj_id=0, ?int $a_tree_id=0) | |||||||||||||
| check access for an object (provide $a_type and $a_obj_id if available for better performance) More... | |||||||||||||
| getInfo () | |||||||||||||
get last info object
| |||||||||||||
| getResultLast () | |||||||||||||
| get last info object More... | |||||||||||||
| getResultAll (int $a_ref_id=0) | |||||||||||||
| doCacheCheck (string $a_permission, string $a_cmd, int $a_ref_id, int $a_user_id) | |||||||||||||
look if result for current query is already in cache
| |||||||||||||
| doTreeCheck (string $a_permission, string $a_cmd, int $a_ref_id, int $a_user_id) | |||||||||||||
| check if object is in tree and not deleted More... | |||||||||||||
| doRBACCheck (string $a_permission, string $a_cmd, int $a_ref_id, int $a_user_id, string $a_type) | |||||||||||||
| rbac check for current object -> type is used for create permission More... | |||||||||||||
| doPathCheck (string $a_permission, string $a_cmd, int $a_ref_id, int $a_user_id, bool $a_all=false) | |||||||||||||
| check read permission for all parents More... | |||||||||||||
| doActivationCheck (string $a_permission, string $a_cmd, int $a_ref_id, int $a_user_id, int $a_obj_id, string $a_type) | |||||||||||||
| check for activation and centralized offline status. More... | |||||||||||||
| doConditionCheck (string $a_permission, string $a_cmd, int $a_ref_id, int $a_user_id, int $a_obj_id, string $a_type) | |||||||||||||
| condition check (currently only implemented for read permission) More... | |||||||||||||
| doStatusCheck (string $a_permission, string $a_cmd, int $a_ref_id, int $a_user_id, int $a_obj_id, string $a_type) | |||||||||||||
| object type specific check More... | |||||||||||||
| clear () | |||||||||||||
| enable (string $a_str, bool $a_bool) | |||||||||||||
| filterUserIdsForCurrentUsersPositionsAndPermission (array $user_ids, string $permission) | |||||||||||||
| |||||||||||||
| filterUserIdsForUsersPositionsAndPermission (array $user_ids, int $for_user_id, string $permission) | |||||||||||||
| |||||||||||||
| isCurrentUserBasedOnPositionsAllowedTo (string $permission, array $on_user_ids) | |||||||||||||
| |||||||||||||
| isUserBasedOnPositionsAllowedTo (int $which_user_id, string $permission, array $on_user_ids) | |||||||||||||
| |||||||||||||
| checkPositionAccess (string $pos_perm, int $ref_id) | |||||||||||||
| |||||||||||||
| checkRbacOrPositionPermissionAccess (string $rbac_perm, string $pos_perm, int $ref_id) | |||||||||||||
| |||||||||||||
| filterUserIdsByPositionOfCurrentUser (string $pos_perm, int $ref_id, array $user_ids) | |||||||||||||
| |||||||||||||
| filterUserIdsByPositionOfUser (int $user_id, string $pos_perm, int $ref_id, array $user_ids) | |||||||||||||
| |||||||||||||
| filterUserIdsByRbacOrPositionOfCurrentUser (string $rbac_perm, string $pos_perm, int $ref_id, array $user_ids) | |||||||||||||
| |||||||||||||
| hasCurrentUserAnyPositionAccess (int $ref_id) | |||||||||||||
| |||||||||||||
| hasUserRBACorAnyPositionAccess (string $rbac_perm, int $ref_id) | |||||||||||||
Protected Attributes | |
| ilOrgUnitPositionAccess | $ilOrgUnitPositionAccess |
| array | $obj_tree_cache |
| array | $obj_type_cache |
| array | $obj_id_cache |
| array | $ac_cache |
| bool | $status |
| bool | $path |
| bool | $condition |
| bool | $tree |
| bool | $rbac |
| bool | $cache |
| ilAccessInfo | $current_info |
| ilAccessInfo | $last_info = null |
| array | $results = [] |
| array | $last_result = [] |
| array | $stored_rbac_access = [] |
| array | $current_result_element = [] |
| ilRbacSystem | $rbacsystem |
| ilObjUser | $user |
| ilLogger | $ac_logger |
| ilDBInterface | $db |
| ilTree | $repositoryTree |
| ilObjectDefinition | $objDefinition |
| ilLanguage | $language = null |
Private Member Functions | |
| getLanguage () | |
Private Attributes | |
| const | MAX_CACHE_SIZE = 1000 |
| bool | $prevent_caching_last_result = false |
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class ilAccessHandler Checks access for ILIAS objects
Definition at line 27 of file class.ilAccess.php.
| ilAccess::__construct | ( | ) |
Definition at line 62 of file class.ilAccess.php.
References $DIC, ilLoggerFactory\getLogger(), ILIAS\Repository\rbac(), ILIAS\Repository\repositoryTree(), and ILIAS\Repository\user().
Here is the call graph for this function:| ilAccess::addInfoItem | ( | string | $a_type, |
| string | $a_text, | ||
| string | $a_data = "" |
||
| ) |
add an info item to current info object
Implements ilRBACAccessHandler.
Definition at line 185 of file class.ilAccess.php.
| ilAccess::checkAccess | ( | string | $a_permission, |
| string | $a_cmd, | ||
| int | $a_ref_id, | ||
| string | $a_type = "", |
||
| ?int | $a_obj_id = null, |
||
| ?int | $a_tree_id = null |
||
| ) |
check access for an object (provide $a_type and $a_obj_id if available for better performance)
Implements ilRBACAccessHandler.
Definition at line 193 of file class.ilAccess.php.
References checkAccessOfUser(), and ILIAS\Repository\user().
Referenced by ilSessionClassificationPathGUI\findSessionContainerForItem().
Here is the call graph for this function:
Here is the caller graph for this function:| ilAccess::checkAccessOfUser | ( | int | $a_user_id, |
| string | $a_permission, | ||
| string | $a_cmd, | ||
| int | $a_ref_id, | ||
| string | $a_type = "", |
||
| ?int | $a_obj_id = 0, |
||
| ?int | $a_tree_id = 0 |
||
| ) |
check access for an object (provide $a_type and $a_obj_id if available for better performance)
Implements ilRBACAccessHandler.
Definition at line 215 of file class.ilAccess.php.
References $DIC, ilObject\_lookupObjId(), ilObject\_lookupType(), doActivationCheck(), doCacheCheck(), doConditionCheck(), doPathCheck(), doRBACCheck(), doStatusCheck(), doTreeCheck(), getLanguage(), ilAccessInfo\IL_NO_PERMISSION, setPreventCachingLastResult(), and storeAccessResult().
Referenced by checkAccess(), doActivationCheck(), doConditionCheck(), doPathCheck(), and ilExerciseDerivedTaskProvider\getFirstRefIdWithPermission().
Here is the call graph for this function:
Here is the caller graph for this function:| ilAccess::checkPositionAccess | ( | string | $pos_perm, |
| int | $ref_id | ||
| ) |
| string | $pos_perm | |
| int | $ref_id | Reference-ID of the desired Object in the tree |
Implements ilOrgUnitPositionAccessHandler.
Definition at line 768 of file class.ilAccess.php.
References ilOrgUnitPositionAccess\checkPositionAccess().
Here is the call graph for this function:| ilAccess::checkRbacOrPositionPermissionAccess | ( | string | $rbac_perm, |
| string | $pos_perm, | ||
| int | $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 776 of file class.ilAccess.php.
References ilOrgUnitPositionAccess\checkRbacOrPositionPermissionAccess().
Here is the call graph for this function:| ilAccess::clear | ( | ) |
Implements ilRBACAccessHandler.
Definition at line 699 of file class.ilAccess.php.
| ilAccess::doActivationCheck | ( | string | $a_permission, |
| string | $a_cmd, | ||
| int | $a_ref_id, | ||
| int | $a_user_id, | ||
| int | $a_obj_id, | ||
| string | $a_type | ||
| ) |
check for activation and centralized offline status.
Implements ilRBACAccessHandler.
Definition at line 512 of file class.ilAccess.php.
References checkAccessOfUser(), ilMemberViewSettings\getInstance(), ilObjectActivation\getItem(), ilObject\lookupOfflineStatus(), ilObjectActivation\TIMINGS_ACTIVATION, and ILIAS\Repository\user().
Referenced by checkAccessOfUser().
Here is the call graph for this function:
Here is the caller graph for this function:| ilAccess::doCacheCheck | ( | string | $a_permission, |
| string | $a_cmd, | ||
| int | $a_ref_id, | ||
| int | $a_user_id | ||
| ) |
look if result for current query is already in cache
Implements ilRBACAccessHandler.
Definition at line 360 of file class.ilAccess.php.
References getStoredAccessResult().
Referenced by checkAccessOfUser().
Here is the call graph for this function:
Here is the caller graph for this function:| ilAccess::doConditionCheck | ( | string | $a_permission, |
| string | $a_cmd, | ||
| int | $a_ref_id, | ||
| int | $a_user_id, | ||
| int | $a_obj_id, | ||
| string | $a_type | ||
| ) |
condition check (currently only implemented for read permission)
Implements ilRBACAccessHandler.
Definition at line 597 of file class.ilAccess.php.
References ilConditionHandler\_checkAllConditionsOfTarget(), ilObject\_lookupTitle(), checkAccessOfUser(), getLanguage(), and ilAccessInfo\IL_MISSING_PRECONDITION.
Referenced by checkAccessOfUser().
Here is the call graph for this function:
Here is the caller graph for this function:| ilAccess::doPathCheck | ( | string | $a_permission, |
| string | $a_cmd, | ||
| int | $a_ref_id, | ||
| int | $a_user_id, | ||
| bool | $a_all = false |
||
| ) |
check read permission for all parents
Implements ilRBACAccessHandler.
Definition at line 482 of file class.ilAccess.php.
References $id, checkAccessOfUser(), getLanguage(), ilAccessInfo\IL_NO_PARENT_ACCESS, and ILIAS\Repository\repositoryTree().
Referenced by checkAccessOfUser().
Here is the call graph for this function:
Here is the caller graph for this function:| ilAccess::doRBACCheck | ( | string | $a_permission, |
| string | $a_cmd, | ||
| int | $a_ref_id, | ||
| int | $a_user_id, | ||
| string | $a_type | ||
| ) |
rbac check for current object -> type is used for create permission
Implements ilRBACAccessHandler.
Definition at line 439 of file class.ilAccess.php.
References getLanguage(), ilAccessInfo\IL_NO_PERMISSION, and storeAccessResult().
Referenced by checkAccessOfUser().
Here is the call graph for this function:
Here is the caller graph for this function:| ilAccess::doStatusCheck | ( | string | $a_permission, |
| string | $a_cmd, | ||
| int | $a_ref_id, | ||
| int | $a_user_id, | ||
| int | $a_obj_id, | ||
| string | $a_type | ||
| ) |
object type specific check
Implements ilRBACAccessHandler.
Definition at line 650 of file class.ilAccess.php.
References $location, and storeAccessResult().
Referenced by checkAccessOfUser().
Here is the call graph for this function:
Here is the caller graph for this function:| ilAccess::doTreeCheck | ( | string | $a_permission, |
| string | $a_cmd, | ||
| int | $a_ref_id, | ||
| int | $a_user_id | ||
| ) |
check if object is in tree and not deleted
Implements ilRBACAccessHandler.
Definition at line 388 of file class.ilAccess.php.
References getLanguage(), ilAccessInfo\IL_DELETED, ilAccessInfo\IL_NO_PERMISSION, ILIAS\Repository\repositoryTree(), and storeAccessResult().
Referenced by checkAccessOfUser().
Here is the call graph for this function:
Here is the caller graph for this function:| ilAccess::enable | ( | string | $a_str, |
| bool | $a_bool | ||
| ) |
Implements ilRBACAccessHandler.
Definition at line 711 of file class.ilAccess.php.
| ilAccess::filterUserIdsByPositionOfCurrentUser | ( | string | $pos_perm, |
| int | $ref_id, | ||
| array | $user_ids | ||
| ) |
| string | $pos_perm | |
| int | $ref_id | |
| int[] | $user_ids |
Implements ilOrgUnitPositionAccessHandler.
Definition at line 784 of file class.ilAccess.php.
References ilOrgUnitPositionAccess\filterUserIdsByPositionOfCurrentUser().
Here is the call graph for this function:| ilAccess::filterUserIdsByPositionOfUser | ( | int | $user_id, |
| string | $pos_perm, | ||
| int | $ref_id, | ||
| array | $user_ids | ||
| ) |
| int | $user_id | |
| string | $pos_perm | |
| int | $ref_id | |
| int[] | $user_ids |
Implements ilOrgUnitPositionAccessHandler.
Definition at line 792 of file class.ilAccess.php.
References ilOrgUnitPositionAccess\filterUserIdsByPositionOfUser().
Here is the call graph for this function:| ilAccess::filterUserIdsByRbacOrPositionOfCurrentUser | ( | string | $rbac_perm, |
| string | $pos_perm, | ||
| int | $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 800 of file class.ilAccess.php.
References ilOrgUnitPositionAccess\filterUserIdsByRbacOrPositionOfCurrentUser().
Here is the call graph for this function:| ilAccess::filterUserIdsForCurrentUsersPositionsAndPermission | ( | array | $user_ids, |
| string | $permission | ||
| ) |
| int[] | $user_ids List of ILIAS-User-IDs which shall be filtered | |
| string | $permission |
Implements ilOrgUnitPositionAccessHandler.
Definition at line 725 of file class.ilAccess.php.
References ilOrgUnitPositionAccess\filterUserIdsForCurrentUsersPositionsAndPermission().
Here is the call graph for this function:| ilAccess::filterUserIdsForUsersPositionsAndPermission | ( | array | $user_ids, |
| int | $for_user_id, | ||
| string | $permission | ||
| ) |
| int[] | $user_ids List of ILIAS-User-IDs which shall be filtered | |
| int | $for_user_id | |
| string | $permission |
Implements ilOrgUnitPositionAccessHandler.
Definition at line 736 of file class.ilAccess.php.
References ilOrgUnitPositionAccess\filterUserIdsForUsersPositionsAndPermission().
Here is the call graph for this function:| ilAccess::getInfo | ( | ) |
get last info object
Implements ilRBACAccessHandler.
Definition at line 332 of file class.ilAccess.php.
|
private |
Definition at line 91 of file class.ilAccess.php.
References $DIC, $language, and ILIAS\UI\examples\Symbol\Glyph\Language\language().
Referenced by checkAccessOfUser(), doConditionCheck(), doPathCheck(), doRBACCheck(), and doTreeCheck().
Here is the call graph for this function:
Here is the caller graph for this function:| ilAccess::getPreventCachingLastResult | ( | ) |
Get prevent caching last result.
Implements ilRBACAccessHandler.
Definition at line 143 of file class.ilAccess.php.
References $prevent_caching_last_result.
Referenced by storeAccessResult().
Here is the caller graph for this function:| ilAccess::getResultAll | ( | int | $a_ref_id = 0 | ) |
Implements ilRBACAccessHandler.
Definition at line 348 of file class.ilAccess.php.
References $results.
| ilAccess::getResultLast | ( | ) |
get last info object
Implements ilRBACAccessHandler.
Definition at line 340 of file class.ilAccess.php.
References $last_result.
| ilAccess::getResults | ( | ) |
Implements ilRBACAccessHandler.
Definition at line 169 of file class.ilAccess.php.
References $results.
| ilAccess::getStoredAccessResult | ( | string | $a_permission, |
| string | $a_cmd, | ||
| int | $a_ref_id, | ||
| ?int | $a_user_id = null |
||
| ) |
get stored access result
| string | $a_permission | permission |
| string | $a_cmd | command string |
| int | $a_ref_id | reference id |
| int | null | $a_user_id | user id (if no id passed, current user id) |
Implements ilRBACAccessHandler.
Definition at line 151 of file class.ilAccess.php.
References ILIAS\Repository\user().
Referenced by doCacheCheck().
Here is the call graph for this function:
Here is the caller graph for this function:| ilAccess::hasCurrentUserAnyPositionAccess | ( | int | $ref_id | ) |
| int | $ref_id |
Implements ilOrgUnitPositionAccessHandler.
Definition at line 813 of file class.ilAccess.php.
References ilOrgUnitPositionAccess\hasCurrentUserAnyPositionAccess().
Here is the call graph for this function:| ilAccess::hasUserRBACorAnyPositionAccess | ( | string | $rbac_perm, |
| int | $ref_id | ||
| ) |
Implements ilOrgUnitPositionAndRBACAccessHandler.
Definition at line 821 of file class.ilAccess.php.
References ilOrgUnitPositionAccess\hasUserRBACorAnyPositionAccess().
Here is the call graph for this function:| ilAccess::isCurrentUserBasedOnPositionsAllowedTo | ( | string | $permission, |
| array | $on_user_ids | ||
| ) |
| string | $permission | |
| int[] | $on_user_ids List of ILIAS-User-IDs |
Implements ilOrgUnitPositionAccessHandler.
Definition at line 748 of file class.ilAccess.php.
References ilOrgUnitPositionAccess\isCurrentUserBasedOnPositionsAllowedTo().
Here is the call graph for this function:| ilAccess::isUserBasedOnPositionsAllowedTo | ( | int | $which_user_id, |
| string | $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 756 of file class.ilAccess.php.
References ilOrgUnitPositionAccess\isUserBasedOnPositionsAllowedTo().
Here is the call graph for this function:| ilAccess::setPreventCachingLastResult | ( | bool | $a_val | ) |
Set prevent caching last result.
Implements ilRBACAccessHandler.
Definition at line 135 of file class.ilAccess.php.
Referenced by checkAccessOfUser().
Here is the caller graph for this function:| ilAccess::setResults | ( | array | $a_results | ) |
Implements ilRBACAccessHandler.
Definition at line 177 of file class.ilAccess.php.
| ilAccess::storeAccessResult | ( | string | $a_permission, |
| string | $a_cmd, | ||
| int | $a_ref_id, | ||
| bool | $a_access_granted, | ||
| ?int | $a_user_id = null, |
||
| ?ilAccessInfo | $a_info = null |
||
| ) |
store access result
Implements ilRBACAccessHandler.
Definition at line 104 of file class.ilAccess.php.
References $current_info, getPreventCachingLastResult(), and ILIAS\Repository\user().
Referenced by checkAccessOfUser(), doRBACCheck(), doStatusCheck(), and doTreeCheck().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 35 of file class.ilAccess.php.
|
protected |
Definition at line 55 of file class.ilAccess.php.
|
protected |
Definition at line 42 of file class.ilAccess.php.
|
protected |
Definition at line 39 of file class.ilAccess.php.
|
protected |
Definition at line 46 of file class.ilAccess.php.
Referenced by storeAccessResult().
|
protected |
Definition at line 51 of file class.ilAccess.php.
|
protected |
Definition at line 56 of file class.ilAccess.php.
|
protected |
Definition at line 31 of file class.ilAccess.php.
|
protected |
Definition at line 60 of file class.ilAccess.php.
Referenced by getLanguage().
|
protected |
Definition at line 47 of file class.ilAccess.php.
|
protected |
Definition at line 49 of file class.ilAccess.php.
Referenced by getResultLast().
|
protected |
Definition at line 34 of file class.ilAccess.php.
|
protected |
Definition at line 32 of file class.ilAccess.php.
|
protected |
Definition at line 33 of file class.ilAccess.php.
|
protected |
Definition at line 58 of file class.ilAccess.php.
|
protected |
Definition at line 38 of file class.ilAccess.php.
|
private |
Definition at line 44 of file class.ilAccess.php.
Referenced by getPreventCachingLastResult().
|
protected |
Definition at line 41 of file class.ilAccess.php.
|
protected |
Definition at line 53 of file class.ilAccess.php.
|
protected |
Definition at line 57 of file class.ilAccess.php.
|
protected |
Definition at line 48 of file class.ilAccess.php.
Referenced by getResultAll(), and getResults().
|
protected |
Definition at line 37 of file class.ilAccess.php.
|
protected |
Definition at line 50 of file class.ilAccess.php.
|
protected |
Definition at line 40 of file class.ilAccess.php.
|
protected |
Definition at line 54 of file class.ilAccess.php.
|
private |
Definition at line 29 of file class.ilAccess.php.