Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Maarch
digitalSafe
Commits
cc556ca5
Commit
cc556ca5
authored
Sep 13, 2022
by
Cyril Vazquez
Browse files
Merge branch 'develop' into 'master'
Merge develop into master for release of 2.6.3 See merge request
!31
parents
5dd3c072
835a50ca
Changes
3
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
cc556ca5
# CHANGELOG
## Version 2.6.3
**Nécessite Maarch RM 2.9**
-
`Fixed`
Contrôle des droits d'accès événements pour les utilisateurs
## Version 2.6.2
**Nécessite Maarch RM 2.6.8**
...
...
VERSION.md
View file @
cc556ca5
2.
6.2
\ No newline at end of file
2.
6.3
bundle/digitalSafe/Controller/digitalSafe.php
View file @
cc556ca5
...
...
@@ -269,7 +269,6 @@ class digitalSafe
$replyMessage
=
new
\
stdClass
();
$replyMessage
->
timestamp
=
\
laabs
::
newTimestamp
();
$replyMessage
->
accountName
=
$this
->
account
->
accountName
;
if
(
!
$this
->
checkRight
(
$originatorOwnerOrgRegNumber
,
$originatorOrgRegNumber
,
$archiveId
))
{
throw
$this
->
getThrowable
(
"Permission denied"
,
401
,
$replyMessage
);
}
...
...
@@ -328,18 +327,18 @@ class digitalSafe
$accountToken
=
\
laabs
::
getToken
(
'AUTH'
);
$account
=
$this
->
sdoFactory
->
read
(
"auth/account"
,
$accountToken
->
accountId
);
$securityLevel
=
$account
->
getSecurityLevel
();
if
(
$account
->
ownerOrgId
!=
$organization
->
orgId
)
{
throw
new
\
core\Exception\UnauthorizedException
(
"You are not allowed to do this action"
);
}
// if ($securityLevel == $account::SECLEVEL_USER) {
// $position = $this->servicePositionController->getPosition($account->accountId);
// if (!$originatorOrgRegNumber || $originatorOrgRegNumber != $position->orgId) {
// throw new \core\Exception\UnauthorizedException("You are not allowed to do this action");
// }
// }
if
(
$securityLevel
==
$account
::
SECLEVEL_USER
)
{
$position
=
$this
->
servicePositionController
->
getPosition
(
$account
->
accountId
);
if
(
!
$originatorOrgRegNumber
||
$originatorOrgRegNumber
!=
$position
->
organization
->
registrationNumber
)
{
throw
new
\
core\Exception\UnauthorizedException
(
"You are not allowed to do this action"
);
}
}
$replyMessage
=
new
\
stdClass
();
$replyMessage
->
originatorOwnerOrgRegNumber
=
$originatorOwnerOrgRegNumber
;
...
...
@@ -620,7 +619,6 @@ class digitalSafe
$replyMessage
=
new
\
stdClass
();
throw
$this
->
getThrowable
(
"archive "
.
$archiveId
.
" doesn't exist"
,
404
,
$replyMessage
);
}
if
(
$archive
->
originatorOwnerOrgRegNumber
==
$originatorOwnerOrgRegNumber
&&
$archive
->
originatorOrgRegNumber
==
$originatorOrgRegNumber
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment