Loading module/Oscar/src/Oscar/Controller/DepenseController.php +1 −1 Original line number Diff line number Diff line Loading @@ -228,7 +228,7 @@ class DepenseController extends AbstractOscarController implements UseServiceCon return $this->getResponseInternalError("Impossible de charger l'activité : " . $e->getMessage()); } $this->getOscarUserContextService()->check(Privileges::DEPENSE_SHOW, $activity); $this->getOscarUserContextService()->check(Privileges::DEPENSE_DETAILS, $activity); try { if( !$activity->getCodeEOTP() ){ Loading module/Oscar/src/Oscar/Controller/ProjectGrantController.php +1 −1 Original line number Diff line number Diff line Loading @@ -1776,7 +1776,7 @@ class ProjectGrantController extends AbstractOscarController implements UseNotif { $action = $this->params()->fromPost('action', null); $activity = $this->getActivityService()->getActivityById($this->params()->fromRoute('id')); $this->getOscarUserContextService()->check(Privileges::DEPENSE_SHOW, $activity); $this->getOscarUserContextService()->check(Privileges::DEPENSE_DETAILS, $activity); $msg = ""; $error = ""; Loading module/Oscar/src/Oscar/Provider/Privileges.php +1 −0 Original line number Diff line number Diff line Loading @@ -129,6 +129,7 @@ class Privileges extends \UnicaenAuth\Provider\Privilege\Privileges const PERSON_SHOW_INM = 'PERSON-SYNC_LDA'; const DEPENSE_SHOW = 'DEPENSE-SHOW'; const DEPENSE_DETAILS = 'DEPENSE-DETAILS'; const DEPENSE_SYNC = 'DEPENSE-SYNC'; const DEPENSE_DOWNLOAD = 'DEPENSE-DOWNLOAD'; const DEPENSE_RECETTES = 'DEPENSE-RECETTES'; Loading module/Oscar/view/oscar/project-grant/show.phtml +1 −8 Original line number Diff line number Diff line Loading @@ -459,15 +459,8 @@ }) </script> <nav> <?php if($this->grant()->privilege(\Oscar\Provider\Privileges::DEPENSE_DETAILS, $entity)): ?> <a class="btn btn-primary" href="<?= $this->url("contract/list-spent", ['id' => $entity->getId()]) ?>">Voir le détail des dépenses</a> <?php if($this->grant()->privilege(\Oscar\Provider\Privileges::DEPENSE_SYNC, $entity)): ?> <form action="<?= $this->url('contract/list-spent', ['id' => $entity->getId()]) ?>" method="post" class="form-inline"> <input type="hidden" name="action" value="update" /> <button type="submit" class="btn btn-primary"> <i class="icon-file-excel"></i> Mettre à jour les données depuis SIFAC </button> </form> <?php endif; ?> </nav> </section> Loading Loading
module/Oscar/src/Oscar/Controller/DepenseController.php +1 −1 Original line number Diff line number Diff line Loading @@ -228,7 +228,7 @@ class DepenseController extends AbstractOscarController implements UseServiceCon return $this->getResponseInternalError("Impossible de charger l'activité : " . $e->getMessage()); } $this->getOscarUserContextService()->check(Privileges::DEPENSE_SHOW, $activity); $this->getOscarUserContextService()->check(Privileges::DEPENSE_DETAILS, $activity); try { if( !$activity->getCodeEOTP() ){ Loading
module/Oscar/src/Oscar/Controller/ProjectGrantController.php +1 −1 Original line number Diff line number Diff line Loading @@ -1776,7 +1776,7 @@ class ProjectGrantController extends AbstractOscarController implements UseNotif { $action = $this->params()->fromPost('action', null); $activity = $this->getActivityService()->getActivityById($this->params()->fromRoute('id')); $this->getOscarUserContextService()->check(Privileges::DEPENSE_SHOW, $activity); $this->getOscarUserContextService()->check(Privileges::DEPENSE_DETAILS, $activity); $msg = ""; $error = ""; Loading
module/Oscar/src/Oscar/Provider/Privileges.php +1 −0 Original line number Diff line number Diff line Loading @@ -129,6 +129,7 @@ class Privileges extends \UnicaenAuth\Provider\Privilege\Privileges const PERSON_SHOW_INM = 'PERSON-SYNC_LDA'; const DEPENSE_SHOW = 'DEPENSE-SHOW'; const DEPENSE_DETAILS = 'DEPENSE-DETAILS'; const DEPENSE_SYNC = 'DEPENSE-SYNC'; const DEPENSE_DOWNLOAD = 'DEPENSE-DOWNLOAD'; const DEPENSE_RECETTES = 'DEPENSE-RECETTES'; Loading
module/Oscar/view/oscar/project-grant/show.phtml +1 −8 Original line number Diff line number Diff line Loading @@ -459,15 +459,8 @@ }) </script> <nav> <?php if($this->grant()->privilege(\Oscar\Provider\Privileges::DEPENSE_DETAILS, $entity)): ?> <a class="btn btn-primary" href="<?= $this->url("contract/list-spent", ['id' => $entity->getId()]) ?>">Voir le détail des dépenses</a> <?php if($this->grant()->privilege(\Oscar\Provider\Privileges::DEPENSE_SYNC, $entity)): ?> <form action="<?= $this->url('contract/list-spent', ['id' => $entity->getId()]) ?>" method="post" class="form-inline"> <input type="hidden" name="action" value="update" /> <button type="submit" class="btn btn-primary"> <i class="icon-file-excel"></i> Mettre à jour les données depuis SIFAC </button> </form> <?php endif; ?> </nav> </section> Loading