Loading data/privileges.php +1 −0 Original line number Diff line number Diff line Loading @@ -148,6 +148,7 @@ return [ 'modeles-edition' => 'Édition des modèles', 'projet-generation' => 'Génération de projet de contrat', 'contrat-generation' => 'Génération de contrat', 'envoi-email' => 'Envoyer le contrat par email', ], ], Loading module/Application/config/contrat.config.php +7 −1 Original line number Diff line number Diff line Loading @@ -224,10 +224,15 @@ return [ ], [ 'controller' => 'Application\Controller\Contrat', 'action' => ['exporter', 'envoyer-mail'], 'action' => ['exporter'], 'privileges' => [Privileges::CONTRAT_CONTRAT_GENERATION, Privileges::CONTRAT_PROJET_GENERATION], 'assertion' => Assertion\ContratAssertion::class, ], [ 'controller' => 'Application\Controller\Contrat', 'action' => ['envoyer-mail'], 'privileges' => [Privileges::CONTRAT_ENVOI_EMAIL], ], [ 'controller' => 'Application\Controller\Contrat', 'action' => ['creer'], Loading Loading @@ -298,6 +303,7 @@ return [ Privileges::CONTRAT_VISUALISATION, Privileges::CONTRAT_PROJET_GENERATION, Privileges::CONTRAT_CONTRAT_GENERATION, Privileges::CONTRAT_ENVOI_EMAIL, ContratAssertion::PRIV_LISTER_FICHIERS, ContratAssertion::PRIV_AJOUTER_FICHIER, ContratAssertion::PRIV_SUPPRIMER_FICHIER, Loading module/Application/src/Application/Provider/Privilege/Privileges.php +1 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ class Privileges extends \UnicaenAuth\Provider\Privilege\Privileges const CLOTURE_EDITION_SERVICES_AVEC_MEP = 'cloture-edition-services-avec-mep'; const CLOTURE_REOUVERTURE = 'cloture-reouverture'; const CONTRAT_CONTRAT_GENERATION = 'contrat-contrat-generation'; const CONTRAT_ENVOI_EMAIL = 'contrat-envoi-email'; const CONTRAT_CREATION = 'contrat-creation'; const CONTRAT_DEPOT_RETOUR_SIGNE = 'contrat-depot-retour-signe'; const CONTRAT_DEVALIDATION = 'contrat-devalidation'; Loading module/Application/view/application/contrat/partial/contrat.phtml +6 −5 Original line number Diff line number Diff line Loading @@ -13,10 +13,6 @@ $validation = $contrat->getValidation(); $retourSigne = $contrat->getDateRetourSigne(); $uploader = $this->uploader(); $urlEmail = $this->isAllowed($contrat, ContratAssertion::PRIV_EXPORT) ? $this->url('contrat/envoyer-mail', ['contrat' => $contrat->getId()]) : null; $urlExport = $this->isAllowed($contrat, ContratAssertion::PRIV_EXPORT) ? $this->url('contrat/exporter', ['contrat' => $contrat->getId()]) // oui car on peut le voir!! : null; Loading @@ -25,6 +21,11 @@ $urlLister = $this->isAllowed($contrat, ContratAssertion::PRIV_LISTER_FICHIERS) ? $this->url('contrat/lister-fichier', ['contrat' => $contrat->getId()], [], true) : null; $urlEmail = $this->isAllowed($contrat, Privileges::CONTRAT_ENVOI_EMAIL) ? $this->url('contrat/envoyer-mail', ['contrat' => $contrat->getId()]) : null; $urlValidation = $this->isAllowed($contrat, Privileges::CONTRAT_VALIDATION) ? $this->url('contrat/valider', ['contrat' => $contrat->getId()]) : null; Loading Loading @@ -56,7 +57,7 @@ $panel = ($retourSigne !== null) ? 'success' : ($validation ? 'info' : 'default' ?> <div class="contrat panel panel-<?= $panel ?>" id="contrat-<?= $contrat->getId() ?>"> <div class="panel-heading panel-heading-h3"> <?php if ($urlExport): ?> <?php if ($urlExport && $urlEmail): ?> <span class="pull-right"> <?php if($disableEmail): ?> <a class="disabled btn btn-<?= $panel ?>" href="<?= $urlEmail ?>" title="L'intervenant du contrat n'a pas renseigné son email."> Loading Loading
data/privileges.php +1 −0 Original line number Diff line number Diff line Loading @@ -148,6 +148,7 @@ return [ 'modeles-edition' => 'Édition des modèles', 'projet-generation' => 'Génération de projet de contrat', 'contrat-generation' => 'Génération de contrat', 'envoi-email' => 'Envoyer le contrat par email', ], ], Loading
module/Application/config/contrat.config.php +7 −1 Original line number Diff line number Diff line Loading @@ -224,10 +224,15 @@ return [ ], [ 'controller' => 'Application\Controller\Contrat', 'action' => ['exporter', 'envoyer-mail'], 'action' => ['exporter'], 'privileges' => [Privileges::CONTRAT_CONTRAT_GENERATION, Privileges::CONTRAT_PROJET_GENERATION], 'assertion' => Assertion\ContratAssertion::class, ], [ 'controller' => 'Application\Controller\Contrat', 'action' => ['envoyer-mail'], 'privileges' => [Privileges::CONTRAT_ENVOI_EMAIL], ], [ 'controller' => 'Application\Controller\Contrat', 'action' => ['creer'], Loading Loading @@ -298,6 +303,7 @@ return [ Privileges::CONTRAT_VISUALISATION, Privileges::CONTRAT_PROJET_GENERATION, Privileges::CONTRAT_CONTRAT_GENERATION, Privileges::CONTRAT_ENVOI_EMAIL, ContratAssertion::PRIV_LISTER_FICHIERS, ContratAssertion::PRIV_AJOUTER_FICHIER, ContratAssertion::PRIV_SUPPRIMER_FICHIER, Loading
module/Application/src/Application/Provider/Privilege/Privileges.php +1 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ class Privileges extends \UnicaenAuth\Provider\Privilege\Privileges const CLOTURE_EDITION_SERVICES_AVEC_MEP = 'cloture-edition-services-avec-mep'; const CLOTURE_REOUVERTURE = 'cloture-reouverture'; const CONTRAT_CONTRAT_GENERATION = 'contrat-contrat-generation'; const CONTRAT_ENVOI_EMAIL = 'contrat-envoi-email'; const CONTRAT_CREATION = 'contrat-creation'; const CONTRAT_DEPOT_RETOUR_SIGNE = 'contrat-depot-retour-signe'; const CONTRAT_DEVALIDATION = 'contrat-devalidation'; Loading
module/Application/view/application/contrat/partial/contrat.phtml +6 −5 Original line number Diff line number Diff line Loading @@ -13,10 +13,6 @@ $validation = $contrat->getValidation(); $retourSigne = $contrat->getDateRetourSigne(); $uploader = $this->uploader(); $urlEmail = $this->isAllowed($contrat, ContratAssertion::PRIV_EXPORT) ? $this->url('contrat/envoyer-mail', ['contrat' => $contrat->getId()]) : null; $urlExport = $this->isAllowed($contrat, ContratAssertion::PRIV_EXPORT) ? $this->url('contrat/exporter', ['contrat' => $contrat->getId()]) // oui car on peut le voir!! : null; Loading @@ -25,6 +21,11 @@ $urlLister = $this->isAllowed($contrat, ContratAssertion::PRIV_LISTER_FICHIERS) ? $this->url('contrat/lister-fichier', ['contrat' => $contrat->getId()], [], true) : null; $urlEmail = $this->isAllowed($contrat, Privileges::CONTRAT_ENVOI_EMAIL) ? $this->url('contrat/envoyer-mail', ['contrat' => $contrat->getId()]) : null; $urlValidation = $this->isAllowed($contrat, Privileges::CONTRAT_VALIDATION) ? $this->url('contrat/valider', ['contrat' => $contrat->getId()]) : null; Loading Loading @@ -56,7 +57,7 @@ $panel = ($retourSigne !== null) ? 'success' : ($validation ? 'info' : 'default' ?> <div class="contrat panel panel-<?= $panel ?>" id="contrat-<?= $contrat->getId() ?>"> <div class="panel-heading panel-heading-h3"> <?php if ($urlExport): ?> <?php if ($urlExport && $urlEmail): ?> <span class="pull-right"> <?php if($disableEmail): ?> <a class="disabled btn btn-<?= $panel ?>" href="<?= $urlEmail ?>" title="L'intervenant du contrat n'a pas renseigné son email."> Loading