From 6e48e4000a304ee3d9514e84cdb84e0d0db56cef Mon Sep 17 00:00:00 2001 From: Etienne Pallier Date: Thu, 15 Jun 2017 18:30:48 +0200 Subject: [PATCH] quelques petits commentaires de plus --- src/Controller/MaterielsController.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+), 0 deletions(-) diff --git a/src/Controller/MaterielsController.php b/src/Controller/MaterielsController.php index 77bf5e8..1072cb1 100755 --- a/src/Controller/MaterielsController.php +++ b/src/Controller/MaterielsController.php @@ -63,6 +63,14 @@ class MaterielsController extends AppController { $this->role = $role; $action = $this->request->params['action']; + /* + * Structure mise en place: + * + * switch ACTION + * switch ROLE + * + */ + switch ($action) { // INDEX, VIEW, ADD, FIND @@ -444,6 +452,22 @@ class MaterielsController extends AppController { ] ]); + /* + * (EP) TODO: + * + * Selon le role (profil) actif, positionner ces tableaux (listes de champs) + * pour dire à quels champs ce role à accès + * et dans quelles conditions (lecture seule, obligatoire, ...) + * + * $hiddenFields = [ fields list ] + * $readonlyFields = [ fields list ] + * $mandatoryFields = [ fields list ] + * $defaultValueForFields = [ field1 => value1, field2 => value2, ..., fieldN => valueN ] + * + * Passer ensuite ces listes à la vue avec set() + * + */ + $IS_CREATED = ( $materiel->status == 'CREATED' ); $IS_VALIDATED = ( $materiel->status == 'VALIDATED' ); $IS_TOBEARCHIVED = ( $materiel->status == 'TOBEARCHIVED' ); -- libgit2 0.21.2