Commit 519d65bd authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

up

parent 61d56bed
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -123,13 +123,11 @@ WITH d(CODE, LIBELLE, DESCRIPTION, VALEURS_POSSIBLES, VALEUR, ORDRE) AS (
    SELECT 'GradeAvecAgent', 'Affichage seulement des grades avec agent', null, 'Boolean', 'true', 200 UNION
    SELECT 'CorrespondanceAvecAgent', 'Affichage seulement des correspondance ayant un agent', null, 'Boolean', 'true', 300 UNION
    SELECT 'ACTIF_ONLY','Ne considérer que les Corps/Correspondances/Grades actifs',null,'Boolean',true, 1000 UNION
    SELECT 'DATE_PORTAIL_AGENT', 'Affichage des dates sur le portail Agent', null, 'Boolean', 'false', 1100
)
SELECT cp.id, d.CODE, d.LIBELLE, d.DESCRIPTION, d.VALEURS_POSSIBLES, d.VALEUR, d.ORDRE
FROM d
JOIN unicaen_parametre_categorie cp ON cp.CODE = 'CARRIERE';


--------------------------------------------------------------------------------------------------------------
-- PRIVILEGE -------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
+14 −8
Original line number Diff line number Diff line
@@ -23,18 +23,24 @@ alter table agent_carriere_affectation add t_hierarchique varchar(1) default 'N'
alter table agent_carriere_affectation add t_fonctionnelle varchar(1) default 'N';
alter table agent_carriere_affectation add quotite integer;

-- Nouveau parametre pour le contrôle de l'affichage des dates sur le portail agent
INSERT INTO unicaen_parametre_parametre(CATEGORIE_ID, CODE, LIBELLE, DESCRIPTION, VALEURS_POSSIBLES, VALEUR, ORDRE)
WITH d(CODE, LIBELLE, DESCRIPTION, VALEURS_POSSIBLES, VALEUR, ORDRE) AS (
    SELECT 'DATE_PORTAIL_AGENT', 'Affichage des dates sur le portail Agent', null, 'Boolean', 'true', 1100
-- Nouveaux privilèges pour l'affichage des agents
INSERT INTO unicaen_privilege_categorie (code, libelle, ordre, namespace) 
VALUES ('agentaffichage', 'Affichage des informations relatives à l''agent', 510, 'Application\Provider\Privilege');
INSERT INTO unicaen_privilege_privilege(CATEGORIE_ID, CODE, LIBELLE, ORDRE)
WITH d(code, lib, ordre) AS (
    SELECT 'agentaffichage_superieur', 'Afficher les supérieur·es hiérarchiques direct·es', 10 UNION
    SELECT 'agentaffichage_autorite', 'Afficher les autorités hiérarchiques', 20 UNION
    SELECT 'agentaffichage_dateresume', 'Afficher les dates sur le résumé de carrière', 30 UNION
    SELECT 'agentaffichage_carrierecomplete', 'Afficher la carrière complète', 40 UNION
    SELECT 'agentaffichage_compte', 'Afficher les informations sur le compte utilisateur', 50
)
SELECT cp.id, d.CODE, d.LIBELLE, d.DESCRIPTION, d.VALEURS_POSSIBLES, d.VALEUR, d.ORDRE
SELECT cp.id, d.code, d.lib, d.ordre
FROM d
JOIN unicaen_parametre_categorie cp ON cp.CODE = 'CARRIERE';


JOIN unicaen_privilege_categorie cp ON cp.CODE = 'agentaffichage';
```

**TODO**: Penser à accorder les nouveaux privilèges en fonction de votre établissement.

**Évolution des bibliothèques**

```bash
+0 −2
Original line number Diff line number Diff line
@@ -141,13 +141,11 @@ class AgentController extends AbstractActionController

        $parametreIntranet = $this->getParametreService()->getParametreByCode('ENTRETIEN_PROFESSIONNEL','INTRANET_DOCUMENT');
        $lienIntranet = ($parametreIntranet)?$parametreIntranet->getValeur():"Aucun lien vers l'intranet";
        $canAffichageDate = ($this->getParametreService()->getParametreByCode(CarriereParametres::TYPE,CarriereParametres::DATE_PORTAIL_AGENT)->getValeur() === "true");

        return new ViewModel([
            'title' => 'Afficher l\'agent',
            'agent' => $agent,
            'affectations' => $agentAffectations,
            'canAffichageDate' => $canAffichageDate,
            'statuts' => $agentStatuts,
            'grades' => $agentGrades,
            'echelon' => $agent->getEchelonActif(),
+0 −1
Original line number Diff line number Diff line
@@ -10,6 +10,5 @@ class CarriereParametres {
    const CORPS_AVEC_AGENT          = 'CorpsAvecAgent';
    const GRADE_AVEC_AGENT          = 'GradeAvecAgent';
    const ACTIF_ONLY                = 'ACTIF_ONLY';
    const DATE_PORTAIL_AGENT        = 'DATE_PORTAIL_AGENT';

};
 No newline at end of file