Commit 6e48e4000a304ee3d9514e84cdb84e0d0db56cef
1 parent
34b6fae0
Exists in
master
and in
3 other branches
quelques petits commentaires de plus
Showing
1 changed file
with
24 additions
and
0 deletions
Show diff stats
src/Controller/MaterielsController.php
... | ... | @@ -63,6 +63,14 @@ class MaterielsController extends AppController { |
63 | 63 | $this->role = $role; |
64 | 64 | $action = $this->request->params['action']; |
65 | 65 | |
66 | + /* | |
67 | + * Structure mise en place: | |
68 | + * | |
69 | + * switch ACTION | |
70 | + * switch ROLE | |
71 | + * | |
72 | + */ | |
73 | + | |
66 | 74 | switch ($action) { |
67 | 75 | |
68 | 76 | // INDEX, VIEW, ADD, FIND |
... | ... | @@ -444,6 +452,22 @@ class MaterielsController extends AppController { |
444 | 452 | ] |
445 | 453 | ]); |
446 | 454 | |
455 | + /* | |
456 | + * (EP) TODO: | |
457 | + * | |
458 | + * Selon le role (profil) actif, positionner ces tableaux (listes de champs) | |
459 | + * pour dire à quels champs ce role à accès | |
460 | + * et dans quelles conditions (lecture seule, obligatoire, ...) | |
461 | + * | |
462 | + * $hiddenFields = [ fields list ] | |
463 | + * $readonlyFields = [ fields list ] | |
464 | + * $mandatoryFields = [ fields list ] | |
465 | + * $defaultValueForFields = [ field1 => value1, field2 => value2, ..., fieldN => valueN ] | |
466 | + * | |
467 | + * Passer ensuite ces listes à la vue avec set() | |
468 | + * | |
469 | + */ | |
470 | + | |
447 | 471 | $IS_CREATED = ( $materiel->status == 'CREATED' ); |
448 | 472 | $IS_VALIDATED = ( $materiel->status == 'VALIDATED' ); |
449 | 473 | $IS_TOBEARCHIVED = ( $materiel->status == 'TOBEARCHIVED' ); | ... | ... |