Commit 718e6782 authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

- Accès aux détails des dépenses limité

parent 423ba07a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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() ){
+1 −1
Original line number Diff line number Diff line
@@ -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 = "";

+1 −0
Original line number Diff line number Diff line
@@ -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';
+1 −8
Original line number Diff line number Diff line
@@ -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>