Commit 04777e00 authored by Arnaud Pauget's avatar Arnaud Pauget
Browse files

Merge branch 'fix/add_current_org_to_list' into 'Support/2.6.X'

fix() : add current organization to list in checkrights

See merge request !22
parents 865024d4 e46ae16e
......@@ -43,10 +43,9 @@ class archive extends \bundle\recordsManagement\Controller\archive
}
$userPositionController = \laabs::newController('organization/userPosition');
//$userServices = array_values($userPositionController->readDescandantService($currentUserService->orgId));
// $org = $this->organizationController->getOrgByRegNumber($archive->originatorOrgRegNumber);
// var_dump($org);exit();
$org = $this->organizationController->getOrgByRegNumber($archive->originatorOrgRegNumber);
$positionAncestors = $this->organizationController->readParentOrg($this->organizationController->getOrgByRegNumber($archive->originatorOrgRegNumber)->orgId);
$positionAncestors[] = $org;
$userServices[] = $currentUserService->registrationNumber;
// OWNER access
......@@ -63,7 +62,6 @@ class archive extends \bundle\recordsManagement\Controller\archive
}
// ORIGINATOR ACCESS
//if (\laabs\in_array($archive->originatorOrgRegNumber, $userServices)) {
foreach ($positionAncestors as $orgUnit) {
if ($orgUnit->registrationNumber == $currentUserService->registrationNumber) {
return true;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment