Commit 0a47ac52 authored by Prosper De Laure's avatar Prosper De Laure
Browse files

FIX : separate privilege for archive modification

parent be762f2f
......@@ -153,8 +153,6 @@ class welcome
$acceptUserIndex = true;
$managementPrivilege = \laabs::callService('auth/userAccount/readHasprivilege', "archiveManagement/modify");
// Archive
$originatorOrg = \laabs::callService('organization/organization/readByregnumber_registrationNumber_', $archive->originatorOrgRegNumber);
$archive->originatorOrgName = $originatorOrg->displayName;
......@@ -221,7 +219,8 @@ class welcome
$this->view->setSource("archivalProfileList", $archivalProfileList);
$this->view->setSource("acceptArchiveWithoutProfile", $acceptArchiveWithoutProfile);
$this->view->setSource("acceptUserIndex", $acceptUserIndex);
$this->view->setSource('managementPrivilege', $managementPrivilege);
$this->view->setSource('managementPrivilege', \laabs::callService('auth/userAccount/readHasprivilege', "archiveManagement/modify"));
$this->view->setSource('modificationPrivilege', \laabs::callService('auth/userAccount/readHasprivilege', "archiveManagement/modifyDescription"));
$this->view->merge();
......
......@@ -134,6 +134,10 @@ msgid "modify"
msgstr "Modifier les règles de gestion d'une archive"
msgctxt "userStory"
msgid "modifyDescription"
msgstr "Modifier les métadonnées d'une archive"
msgctxt "userStory"
msgid "migration"
msgstr "Gérer les migrations de format"
msgctxt "userStory"
......
......@@ -22,6 +22,7 @@
<div class="col-xs-12">
<h4 class="text-center text-info">
<?merge archive.archivalProfileName ?>
<?merge modificationPrivilege.bool() ?>
<button type="button" class="btn btn-default btn-sm" id="editMetadata" title="Edit" style="border:0px solid transparent"><i class="fa fa-edit"></i></button>
</h4>
<table>
......
<?php
/*
* Copyright (C) 2015 Maarch
*
* This file is part of maarchRM.
*
* maarchRM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* maarchRM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with bundle recordsManagement. If not, see <http://www.gnu.org/licenses/>.
*/
namespace presentation\maarchRM\UserStory\archiveManagement;
/**
* Interface for archive modification
*/
interface modifyDescriptionInterface
{
/**
* Change the information of archive
* @param string $archiveId
* @param string $originatorArchiveId
* @param string $archiveName
* @param string $description
*
*
* @return recordsManagement/archive/metadata
*
* @uses recordsManagement/archives/updateMetadata
*/
public function updateRecordsmanagementArchiveMetadata($archiveId,$originatorArchiveId,$archiveName,$description);
}
\ No newline at end of file
......@@ -115,21 +115,4 @@ interface modifyInterface
* @uses recordsManagement/archives/updateUnfreeze
*/
public function updateRecordsmanagementArchiveUnfreeze($archiveIds, $comment, $identifiant);
// --------------------------------------------------------------------------
// Metadata
// --------------------------------------------------------------------------
/**
* Change the information of archive
* @param string $archiveId
* @param string $originatorArchiveId
* @param string $archiveName
* @param string $description
*
*
* @return recordsManagement/archive/metadata
*
* @uses recordsManagement/archives/updateMetadata
*/
public function updateRecordsmanagementArchiveMetadata($archiveId,$originatorArchiveId,$archiveName,$description);
}
\ No newline at end of file
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