Commit 7c88569289d9bdea4d9652fce4cdfcb510464f40
1 parent
9138c855
Exists in
master
and in
2 other branches
simplification acl
Showing
2 changed files
with
8 additions
and
2 deletions
Show diff stats
src/Template/Materiels/edit.ctp
... | ... | @@ -340,9 +340,12 @@ if ($IS_VALIDATED && $materiel->numero_serie) |
340 | 340 | 'options' => $fournisseurs, |
341 | 341 | 'style' => 'width: 380px', |
342 | 342 | 'empty' => 'choisir un fournisseur', |
343 | - 'disabled' => in_array($role, [ | |
343 | + 'disabled' => $USER_IS_UTILISATEUR | |
344 | + /* | |
345 | + in_array($role, [ | |
344 | 346 | 'Utilisateur' |
345 | 347 | ]) |
348 | + */ | |
346 | 349 | ]); |
347 | 350 | echo $this->Form->control('organisme_id', [ |
348 | 351 | 'options' => $organismes, | ... | ... |
src/Template/Materiels/view.ctp
... | ... | @@ -485,11 +485,14 @@ $panne = h($materiel->hors_service) ? ' (HORS SERVICE)' : ''; |
485 | 485 | ]); |
486 | 486 | |
487 | 487 | // BOUTON ETIQUETTE (si imprimante disponible) |
488 | - if ($IS_VALIDATED && $configuration->hasPrinter && in_array($role, [ | |
488 | + if ($IS_VALIDATED && $configuration->hasPrinter && $USER_IS_ADMIN_OR_MORE) { | |
489 | + /* | |
490 | + in_array($role, [ | |
489 | 491 | 'Administration', |
490 | 492 | 'Administration Plus', |
491 | 493 | 'Super Administrateur' |
492 | 494 | ])) { |
495 | + */ | |
493 | 496 | // echo "<br/>"; |
494 | 497 | // echo '<div id="etiquette" class="actions" style="margin-bottom: 20px; width: 100%; float: none; padding: 10px 0;">'; |
495 | 498 | // - Bouton "Imprimer sur un ruban" | ... | ... |