Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Maarch
maarchRM
Commits
4df8ea9d
Commit
4df8ea9d
authored
Nov 29, 2021
by
Arnaud Pauget
Browse files
fix(18080) : fix deleted actions by an other commit
parent
039a01aa
Pipeline
#14660
failed with stages
in 59 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/presentation/maarchRM/Presenter/recordsManagement/archive.php
View file @
4df8ea9d
...
...
@@ -1349,6 +1349,7 @@ class archive
protected
function
readPrivilegesOnArchives
()
{
$hasModificationPrivilege
=
\
laabs
::
callService
(
'auth/userAccount/readHasprivilege'
,
"archiveManagement/modify"
);
$hasModificationOriginatorPrivilege
=
\
laabs
::
callService
(
'auth/userAccount/readHasprivilege'
,
"archiveManagement/adminOriginator"
);
$hasIntegrityCheckPrivilege
=
\
laabs
::
callService
(
'auth/userAccount/readHasprivilege'
,
"archiveManagement/checkIntegrity"
);
$hasDestructionPrivilege
=
\
laabs
::
callService
(
'auth/userAccount/readHasprivilege'
,
"destruction/destructionRequest"
);
$hasRestitutionPrivilege
=
$this
->
transaction
&&
\
laabs
::
callService
(
'auth/userAccount/readHasprivilege'
,
"restitution/restitutionRequest"
);
...
...
@@ -1357,6 +1358,7 @@ class archive
$hasModificationRequestPrivilege
=
$this
->
transaction
&&
\
laabs
::
callService
(
'auth/userAccount/readHasprivilege'
,
"archiveManagement/modificationRequestSend"
);
$this
->
view
->
setSource
(
'hasModificationPrivilege'
,
$hasModificationPrivilege
);
$this
->
view
->
setSource
(
'hasModificationOriginatorPrivilege'
,
$hasModificationOriginatorPrivilege
);
$this
->
view
->
setSource
(
'hasIntegrityCheckPrivilege'
,
$hasIntegrityCheckPrivilege
);
$this
->
view
->
setSource
(
'hasDestructionPrivilege'
,
$hasDestructionPrivilege
);
$this
->
view
->
setSource
(
'hasRestitutionPrivilege'
,
$hasRestitutionPrivilege
);
...
...
@@ -1428,4 +1430,31 @@ class archive
return
$file
;
}
/**
* Serializer JSON for changing originator method
* @param array $result
*
* @return object JSON object with a status and message parameters
*/
public
function
setOriginator
(
$result
)
{
$success
=
count
(
$result
[
'success'
]);
$echec
=
count
(
$result
[
'error'
]);
$this
->
json
->
message
=
'%1$s archive(s) modified.'
;
$this
->
json
->
message
=
$this
->
translator
->
getText
(
$this
->
json
->
message
);
$this
->
json
->
message
=
sprintf
(
$this
->
json
->
message
,
$success
);
if
(
$echec
>
0
)
{
$message
=
'%1$s archive(s) can not be modified.'
;
$message
=
$this
->
translator
->
getText
(
$message
);
$message
=
sprintf
(
$message
,
$echec
);
$this
->
json
->
message
.
=
' '
.
$message
;
}
return
$this
->
json
->
save
();
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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