52 $assignment_of_user = $this->ua->getAssignmentsOfUserId($for_user_id);
53 $other_users_in_same_org_units = [];
54 foreach ($assignment_of_user as $assignment) {
55 $other_users_in_same_org_units = $other_users_in_same_org_units + $this->ua->getUserIdsOfOrgUnit($assignment->getOrguId());
58 return array_intersect($user_ids, $other_users_in_same_org_units);
80 return ($on_user_ids === array_intersect($on_user_ids, $filtered_user_ids)
81 && $filtered_user_ids === array_intersect($filtered_user_ids, $on_user_ids));
91 if (!$this->set->getObjectPositionSettingsByType($this->getTypeForRefId($ref_id))->isActive()) {
107 if (!$this->set->getObjectPositionSettingsByType($this->getTypeForRefId($ref_id))->isActive()) {
117 $allowed_user_ids = [];
118 foreach ($this->ua->getPositionsOfUserId($user_id) as $position) {
119 $permissions = ilOrgUnitPermissionQueries::getSetForRefId($ref_id, $position->getId());
120 if (!$permissions->isOperationIdSelected($operation->getOperationId())) {
124 foreach ($position->getAuthorities() as
$authority) {
129 $allowed = $this->ua->getUserIdsOfOrgUnitsOfUsersPosition($position->getId(), $user_id);
130 $allowed_user_ids = $allowed_user_ids + $allowed;
133 $allowed = $this->ua->getUserIdsOfOrgUnitsOfUsersPosition($position->getId(), $user_id,
true);
134 $allowed_user_ids = $allowed_user_ids + $allowed;
141 $allowed = $this->ua->getUserIdsOfUsersOrgUnitsInPosition($user_id, $position->getId(),
$authority->getOver());
142 $allowed_user_ids = $allowed_user_ids + $allowed;
145 $allowed = $this->ua->getUserIdsOfUsersOrgUnitsInPosition($user_id, $position->getId(),
$authority->getOver(),
true);
146 $allowed_user_ids = $allowed_user_ids + $allowed;
154 return array_intersect($user_ids, $allowed_user_ids);
174 foreach ($this->ua->getPositionsOfUserId($current_user_id) as $position) {
175 $permissions = ilOrgUnitPermissionQueries::getSetForRefId($ref_id, $position->getId());
176 if ($permissions->isOperationIdSelected($operation->getOperationId())) {
197 foreach ($this->ua->getPositionsOfUserId($current_user_id) as $position) {
198 $permissions = ilOrgUnitPermissionQueries::getSetForRefId($ref_id, $position->getId());
199 if (count($permissions->getOperations()) > 0) {
215 if ($DIC->access()->checkAccess($rbac_perm,
'', $ref_id)) {
235 if ($DIC->access()->checkAccess($rbac_perm,
'', $ref_id)) {
253 if ($DIC->access()->checkAccess($rbac_perm,
'', $ref_id)) {
279 return $this->
dic()->user()->getId();
290 if (!isset(self::$ref_id_obj_type_map[$ref_id])) {
294 return self::$ref_id_obj_type_map[$ref_id];
318 return $this->
set->isPositionAccessActiveForObject($obj_id);
hasCurrentUserAnyPositionAccess($ref_id)
bool
isCurrentUserBasedOnPositionsAllowedTo($permission, array $on_user_ids)
$on_user_ids List of ILIAS-User-IDsgetAvailablePositionRelatedPermissions for available permissionsbo...
filterUserIdsByPositionOfCurrentUser($pos_perm, $ref_id, array $user_ids)
$user_idsgetAvailablePositionRelatedPermissions for available permissionsint[]
filterUserIdsForCurrentUsersPositionsAndPermission(array $user_ids, $permission)
$user_ids List of ILIAS-User-IDs which shall be filteredgetAvailablePositionRelatedPermissions for av...
checkPositionAccess($pos_perm, $ref_id)
Reference-ID of the desired Object in the treegetAvailablePositionRelatedPermissions for available pe...
checkRbacOrPositionPermissionAccess($rbac_perm, $pos_perm, $ref_id)
See the list of available permissions in interface ilOrgUnitPositionAccessHandler Reference-ID of the...
filterUserIdsForUsersPositionsAndPermission(array $user_ids, $for_user_id, $permission)
$user_ids List of ILIAS-User-IDs which shall be filtered getAvailablePositionRelatedPermissions for a...
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static _lookupObjectId($a_ref_id)
Class ilOrgUnitPositionAccess.
Interface ilOrgUnitPositionAndRBACAccessHandler.
static getInstance()
Get instance.
hasUserRBACorAnyPositionAccess($rbac_perm, $ref_id)
bool
getObjIdForRefId($ref_id)
__construct()
ilOrgUnitPositionAccess constructor.
filterUserIdsByRbacOrPositionOfCurrentUser($rbac_perm, $pos_perm, $ref_id, array $user_ids)
See the list of available permissions in interface ilOrgUnitPositionAccessHandler Reference-ID of the...
isUserBasedOnPositionsAllowedTo($which_user_id, $permission, array $on_user_ids)
Permission check for this ILIAS-User-ID $on_user_ids List of ILIAS-User-IDsgetAvailablePositionRelate...
isPositionActiveForRefId($ref_id)
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
Interface ilOrgUnitPositionAccessHandler.
static $ref_id_obj_type_map
static findByOperationString($operation_string, $context_name)
const SCOPE_SUBSEQUENT_ORGUS
filterUserIdsByPositionOfUser($user_id, $pos_perm, $ref_id, array $user_ids)
$user_idsgetAvailablePositionRelatedPermissions for available permissionsint[]