Commit 6f2902f3 authored by Arnaud Pauget's avatar Arnaud Pauget
Browse files

Merge branch 'release/2.6.2' into 'develop'

Release/2.6.2

See merge request !24
parents 706f963b 13559870
2.6.1
\ No newline at end of file
2.6.2
\ No newline at end of file
......@@ -458,6 +458,12 @@ class digitalSafe
$archiveId = null,
$hasLog = true
) {
$currentUserService = \laabs::getToken("ORGANIZATION");
$org = $this->organizationController->getOrgByRegNumber($originatorOrgRegNumber);
$positionAncestors = $this->organizationController->readParentOrg($this->organizationController->getOrgByRegNumber($originatorOrgRegNumber)->orgId);
$positionAncestors[] = $org;
$queryParts = array();
$queryParams = array();
......@@ -477,20 +483,11 @@ class digitalSafe
throw $this->getThrowable("The organization must not be a organization unit", 403, $replyMessage);
}
$userPositions = $this->userPositionController->listPositions($this->account->accountId);
$userPositions[] = $this->servicePositionController->getPosition($this->account->accountId);
$userPosition = $this->servicePositionController->getPosition($this->account->accountId);
$organizations = $this->organizationController->readDescendantServices($organization->orgId);
$userOrganisations = [];
foreach ($organizations as $organization) {
if (is_null($originatorOrgRegNumber)
|| $originatorOrgRegNumber == $organization->registrationNumber) {
foreach ($userPositions as $userPosition) {
if ($userPosition->orgId == $organization->orgId) {
$userOrganisations[] = $organization;
}
}
foreach ($positionAncestors as $orgUnit) {
if ($orgUnit->registrationNumber == $currentUserService->registrationNumber) {
$userOrganisations[] = $org;
}
}
......
......@@ -33,6 +33,8 @@
SetEnv LAABS_DEPENDENCIES repository;xml;html;localisation;datasource;sdo;json;fileSystem;notification;PDF;csrf;csv;timestamp
SetEnv LAABS_PRESENTATION maarchRM
SetEnv SERVICE_CLIENT_TOKEN service
SetEnv LAABS_SESSION_START Off
#SetEnv LAABS_SECURE_COOKIE On
SetEnv LAABS_CONFIGURATION "../src/ext/digitalSafe/data/conf/configuration.ini"
SetEnv LAABS_LOG "../data/maarchRM/log.txt"
......
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