Skip to content
Snippets Groups Projects
Commit 8838be62 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Suppression des usages résiduels du privilège qui n'existe plus.

parent 5a136bea
No related branches found
No related tags found
No related merge requests found
<?php <?php
use Application\Entity\Db\Repository\DefaultEntityRepository; use Application\Entity\Db\Repository\DefaultEntityRepository;
use Application\Provider\Privilege\FichierPrivileges;
use Information\Controller\FichierController; use Information\Controller\FichierController;
use Information\Controller\InformationController; use Information\Controller\InformationController;
use Information\Controller\InformationControllerFactory; use Information\Controller\InformationControllerFactory;
...@@ -112,10 +113,18 @@ return [ ...@@ -112,10 +113,18 @@ return [
'action' => [ 'action' => [
'index', 'index',
'supprimer', 'supprimer',
],
'privileges' => [
InformationPrivileges::INFORMATION_MODIFIER,
]
],
[
'controller' => FichierController::class,
'action' => [
'telecharger', 'telecharger',
], ],
'privileges' => [ 'privileges' => [
InformationPrivileges::INFORMATION_FICHIER, FichierPrivileges::FICHIER_DIVERS_TELECHARGER,
] ]
], ],
], ],
......
...@@ -15,5 +15,4 @@ class InformationPrivileges extends Privileges ...@@ -15,5 +15,4 @@ class InformationPrivileges extends Privileges
* Todo: créer une catégorie de privilèges 'page-information'. * Todo: créer une catégorie de privilèges 'page-information'.
*/ */
const INFORMATION_MODIFIER = 'faq-modifier-information'; const INFORMATION_MODIFIER = 'faq-modifier-information';
const INFORMATION_FICHIER = 'faq-modifier-fichier';
} }
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
/** @var Fichier[] $fichiers */ /** @var Fichier[] $fichiers */
use Application\Entity\Db\Fichier; use Application\Entity\Db\Fichier;
use Information\Provider\Privilege\InformationPrivileges; use Application\Provider\Privilege\FichierPrivileges;
$this->headTitle("Fichiers associés aux pages d'information"); $this->headTitle("Fichiers associés aux pages d'information");
$canFichier = $this->isAllowed(InformationPrivileges::getResourceId(InformationPrivileges::INFORMATION_FICHIER)); $canFichier = $this->isAllowed(FichierPrivileges::getResourceId(FichierPrivileges::FICHIER_DIVERS_TELEVERSER));
?> ?>
<style> <style>
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
* @var Information[] $informations * @var Information[] $informations
*/ */
use Application\Provider\Privilege\FichierPrivileges;
use Information\Entity\Db\Information; use Information\Entity\Db\Information;
use Information\Provider\Privilege\InformationPrivileges; use Information\Provider\Privilege\InformationPrivileges;
...@@ -12,7 +13,7 @@ $this->headTitle("Index des informations"); ...@@ -12,7 +13,7 @@ $this->headTitle("Index des informations");
$canView = true; $canView = true;
$canEdit = $this->isAllowed(InformationPrivileges::getResourceId(InformationPrivileges::INFORMATION_MODIFIER)); $canEdit = $this->isAllowed(InformationPrivileges::getResourceId(InformationPrivileges::INFORMATION_MODIFIER));
$canDelete = $this->isAllowed(InformationPrivileges::getResourceId(InformationPrivileges::INFORMATION_MODIFIER)); $canDelete = $this->isAllowed(InformationPrivileges::getResourceId(InformationPrivileges::INFORMATION_MODIFIER));
$canFichier = $this->isAllowed(InformationPrivileges::getResourceId(InformationPrivileges::INFORMATION_FICHIER)); $canFichier = $this->isAllowed(FichierPrivileges::getResourceId(FichierPrivileges::FICHIER_DIVERS_TELEVERSER));
?> ?>
<style> <style>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment