You should have received a copy of the GNU General Public License
and the CeCILL-C along with Lilie. If not, see :
<http://www.gnu.org/licenses/> and
- <http://www.cecill.info/licences.fr.html>.
+ <http://www.cecill.info/licences.fr.html>.
\ No newline at end of file
*/
public List<RessourceIndexeeInfo> getGroupesEtendusInfo()
+ public void setCacheAllFonctionnaliteParametrableEtablissement(Map<Long, HashSet<EliotFonctionnalites>> fonctionnalitesParametrablesAccessible)
+
+
+ public void verifieAccesFonctionnalite(EliotFonctionnalites fonctionnalite, Long etablissementId)
+
+ public void verifieAccesFonctionnalitesList(List<EliotFonctionnalites> fonctionnalites, Long etablissementId)
+
+ /**
+ * Détermine si la securiteSession détient le droit d'accès à une fonctionnalité paramétrable donnée
+ */
+ public boolean hasAccesFonctionnalite(EliotFonctionnalites fonctionnalite, Long etablissementId)
+ /**
+ * Détermine si la securiteSession détient le droit d'accès sur au moins une des fonctionnalités paramétrables données
+ */
+ public boolean hasAccesFonctionnalitesList(List<EliotFonctionnalites> fonctionnalites, Long etablissementId)
+
+
+ public List<EliotFonctionnalites> allFonctionnalite(Long etablissementId)
+
}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+package org.lilie.services.eliot.annuaire
+
+/**
+ * Représente une fonctionnalité d'éliot
+ */
+public interface EliotFonctionnalites {
+
+ public String getCode()
+
+ public Boolean isParametrable()
+
+}
\ No newline at end of file
*/
public enum FonctionEnum {
- ADMIN_CENTRAL("AC"),
- ADMIN_LOCAL("AL"),
- CORRESPONDANT_DEPLOIEMENT("CD"),
- ELEVE("ELEVE"),
- PERS_REL_ELEVE("PERS_REL_ELEVE"), // Responsable élève (parent)
- ENSEIGNANT("ENS"),
- DIRECTION("DIR"),
- DOCUMENTALISTE("DOC"),
- EDUCATION("EDU"),
- CHEF_TRAVAUX("CTR"),
- INVITE("UI"),
- CONSEILLER_FORMATION_CONTINUE("CFC"),
- PERSONNEL_ADMINISTRATIF("ADF"),
- LABORATOIRE("ALB"),
- PERSONNEL_LABORATOIRE("LAB"),
- ASSISTANT_ETRANGER("ASE"),
- PERSONNEL_MEDICO_SOCIAL("MDS"),
- PERSONNEL_OUVRIER("OUV"),
- SURVEILLANCE("SUR")
+ ADMIN_CENTRAL(
+ "AC",
+ "eliot.fonction.libelle.AC",
+ true),
+ ADMIN_LOCAL(
+ "AL",
+ "eliot.fonction.libelle.AL",
+ true
+ ),
+ CORRESPONDANT_DEPLOIEMENT(
+ "CD",
+ "eliot.fonction.libelle.CD",
+ true
+ ),
+ ELEVE(
+ "ELEVE",
+ "eliot.fonction.libelle.ELEVE",
+ false
+ ),
+ PERS_REL_ELEVE( // Responsable élève (parent)
+ "PERS_REL_ELEVE",
+ "eliot.fonction.libelle.PERS_REL_ELEVE",
+ false
+ ),
+ ENSEIGNANT(
+ "ENS",
+ "eliot.fonction.libelle.ENS",
+ false
+ ),
+ DIRECTION(
+ "DIR",
+ "eliot.fonction.libelle.DIR",
+ false
+ ),
+ DOCUMENTALISTE(
+ "DOC",
+ "eliot.fonction.libelle.DOC",
+ true
+ ),
+ EDUCATION(
+ "EDU",
+ "eliot.fonction.libelle.EDU",
+ true
+ ),
+ CHEF_TRAVAUX(
+ "CTR",
+ "eliot.fonction.libelle.CTR",
+ true
+ ),
+ INVITE(
+ "UI",
+ "eliot.fonction.libelle.UI",
+ true
+ ),
+ CONSEILLER_FORMATION_CONTINUE(
+ "CFC",
+ "eliot.fonction.libelle.CFC",
+ true
+ ),
+ PERSONNEL_ADMINISTRATIF(
+ "ADF",
+ "eliot.fonction.libelle.ADF",
+ true
+ ),
+ LABORATOIRE(
+ "ALB",
+ "eliot.fonction.libelle.ALB",
+ true
+ ),
+ PERSONNEL_LABORATOIRE(
+ "LAB",
+ "eliot.fonction.libelle.LAB",
+ true
+ ),
+ ASSISTANT_ETRANGER(
+ "ASE",
+ "eliot.fonction.libelle.ASE",
+ true
+ ),
+ PERSONNEL_MEDICO_SOCIAL(
+ "MDS",
+ "eliot.fonction.libelle.MDS"
+ ,true
+ ),
+ PERSONNEL_OUVRIER(
+ "OUV",
+ "eliot.fonction.libelle.OUV",
+ true
+ ),
+ SURVEILLANCE(
+ "SUR",
+ "eliot.fonction.libelle.SUR",
+ true
+ ),
+ ORIENTATION(
+ "ORI",
+ "eliot.fonction.libelle.ORI",
+ true
+ ),
+ ASSISTANT_EDUCATION(
+ "AED",
+ "eliot.fonction.libelle.AED",
+ true
+ ),
+ AUXILIAIRE_VIE_SCOLAIRE(
+ "AVS",
+ "eliot.fonction.libelle.AVS",
+ true
+ ),
+ APPRENTISSAGE(
+ "APP",
+ "eliot.fonction.libelle.APP",
+ true
+ )
private final String CODE
+ private final String LIBELLE
+ private final Boolean ACCES_PARAMETRABLE
// hack : les stubs java generes par gmaven necessite un constructeur par defaut
private FonctionEnum() {}
- private FonctionEnum(String code) {
+ private FonctionEnum(String code, String libelle, Boolean accesParametrable) {
this.CODE = code
+ this.LIBELLE = libelle
+ this.ACCES_PARAMETRABLE = accesParametrable
}
public String getCode() {
return CODE
}
+ public String getLibelle(){
+ return LIBELLE
+ }
+
+ public Boolean getAccesParametrable(){
+ return ACCES_PARAMETRABLE
+ }
+
public static FonctionEnum parseFromCode(String code) {
return (FonctionEnum) FonctionEnum.find {
it.code == code
}
eliot.mode.maintenance = false
-eliot.scolarite.anneeencours = "2012-2013"
+eliot.scolarite.anneeencours = "2013-2014"
throw AutorisationException.consultationContenuException()
}
- // jbui : blocage des pages de gestion
- if (!accesAutoriseSiAccessGestionDemande(controllerName, session)) {
- throw AutorisationException.consultationContenuException()
- }
-
// NOM_VERIFICATEUR_ACCES devrait être implementé dans le modules
if (applicationContext.containsBean(NOM_VERIFICATEUR_ACCES)) {
if (!verifieDroitsAcces(session)) {
return true
}
- private boolean accesAutoriseSiAccessGestionDemande(def controllerName,
- def session) {
- SecuriteSession securiteSession = SessionUtils.securiteSession(session)
-
- if ((isControllerGestion(controllerName) &&
-
- !(
- securiteSession.hasFonctionIn([
- FonctionEnum.ADMIN_CENTRAL,
- FonctionEnum.ADMIN_LOCAL,
- FonctionEnum.DIRECTION,
- FonctionEnum.CHEF_TRAVAUX,
- FonctionEnum.EDUCATION,
- FonctionEnum.CORRESPONDANT_DEPLOIEMENT
- ])
- ))) {
- log.warn(
- """Tentative d'accès à une page de gestion
- par ${session.acteur.securiteSession.defaultAutorite.idExterne}
- Environment: ${Environment.current}"""
- )
- return false
- }
- return true
- }
-
}
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+package org.lilie.services.eliot.securite.impl
+
+import org.lilie.services.eliot.scolarite.Etablissement
+import org.lilie.services.eliot.annuaire.Fonction
+
+class AccesFonctionnaliteFonction {
+
+ Etablissement etablissement
+ Fonctionnalite fonctionnalite
+ Fonction fonction
+ Boolean actif
+
+ static mapping = {
+ table('securite.acces_fonctionnalite_fonction')
+ id column: 'id', generator: 'sequence', params: [sequence: 'securite.acces_fonctionnalite_fonction_id_seq']
+ cache true
+ version false
+ }
+
+ static constraints = {
+ etablissement(nullable: false)
+ actif(nullable: false)
+ }
+
+
+}
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+
+
+package org.lilie.services.eliot.securite.impl
+
+import org.lilie.services.eliot.scolarite.Etablissement
+import org.lilie.services.eliot.annuaire.Fonction
+
+class AccesFonctionnaliteFonctionDefaut {
+
+ Fonctionnalite fonctionnalite
+ Fonction fonction
+ Boolean actif
+
+ static mapping = {
+ table('securite.acces_fonctionnalite_fonction_defaut')
+ id column: 'id', generator: 'sequence', params: [sequence: 'securite.acces_fonctionnalite_fonction_defaut_id_seq']
+ cache true
+ version false
+ }
+
+ static constraints = {
+ actif(nullable: false)
+ }
+
+
+}
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+
+
+
+
+
+
+
+
+
+
+package org.lilie.services.eliot.securite.impl
+
+import org.lilie.services.eliot.scolarite.Etablissement
+import org.lilie.services.eliot.scolarite.Personne
+
+
+class AccesFonctionnalitePersonne {
+
+ Etablissement etablissement
+ Fonctionnalite fonctionnalite
+ Personne personne
+
+ static constraints = {
+ etablissement(nullable: false)
+ fonctionnalite(nullable: false)
+ personne(nullable: false)
+ }
+
+ static mapping = {
+ table('securite.acces_fonctionnalite_personne')
+ id column: 'id', generator: 'sequence', params: [sequence: 'securite.acces_fonctionnalite_personne_id_seq']
+ cache true
+ version false
+ }
+
+
+
+}
}
/**
- * @return true si cette autorité est de type Eliot, false sinon
+ * @return true si cette autorité est de type Système, false sinon
*/
public boolean isTypeEliot() {
return type == TYPE_ELIOT
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+
+
+package org.lilie.services.eliot.securite.impl
+
+/**
+ * Fonctionnalité paramétrable dans Scolarite/Paramétrage/Accès aux fonctions
+ */
+class Fonctionnalite {
+
+ // correspond à l'entrée de menu
+ String code
+
+ Fonctionnalite parent
+
+ Boolean parametrable
+
+ Integer ordre
+
+ Boolean groupe
+
+ static constraints = {
+ groupe(nullable: false)
+ ordre(nullable: false)
+ parametrable(nullable: false)
+ code(nullable: false)
+ parent(nullable: true)
+ }
+
+ static mapping = {
+ table('securite.fonctionnalite')
+ id column: 'id', generator: 'sequence', params: [sequence: 'securite.fonctionnalite_id_seq']
+ cache true
+ version false
+ }
+
+ public String toString(){
+ "Fonctionnalite $code {$ordre, groupe=$groupe, parametrable=$parametrable}"
+ }
+
+}
eliot.pasDeDecompte.jour=(en journ\u00e9es)
eliot.pasDeDecompte.demiJour=(en demi-journ\u00e9es)
eliot.pasDeDecompte.heure=(en heures)
+
+eliot.fonction.libelle.AC=Administrateur central
+eliot.fonction.libelle.AL=Administrateur local
+eliot.fonction.libelle.CD=Correspondant de d\u00e9ploiement
+eliot.fonction.libelle.ELEVE=El\u00e8ve
+eliot.fonction.libelle.PERS_REL_ELEVE=Responsable \u00e9l\u00e8ve
+eliot.fonction.libelle.ENS=Enseignant
+eliot.fonction.libelle.DIR=Direction
+eliot.fonction.libelle.DOC=Documentaliste
+eliot.fonction.libelle.EDU=Education
+eliot.fonction.libelle.CTR=Chef de travaux
+eliot.fonction.libelle.UI=Invit\u00e9
+eliot.fonction.libelle.CFC=Conseiller de formation continue
+eliot.fonction.libelle.ADF=Personnel administratif
+eliot.fonction.libelle.ALB=Laboratoire
+eliot.fonction.libelle.LAB=Personnel de laboratoire
+eliot.fonction.libelle.ASE=Assistant \u00e9tranger
+eliot.fonction.libelle.MDS=Assistant m\u00e9dico-social
+eliot.fonction.libelle.OUV=Personnel ouvrier
+eliot.fonction.libelle.SUR=Surveillance
+eliot.fonction.libelle.ORI=Orientation
+eliot.fonction.libelle.AED=Assistant d'\u00e9ducation
+eliot.fonction.libelle.AVS=Auxiliaire de vie scolaire
+eliot.fonction.libelle.APP=Apprentissage
+
* <http://www.cecill.info/licences.fr.html>.
*/
+package org.lilie.services.eliot.absences
+import org.lilie.services.eliot.annuaire.EliotFonctionnalites
+/**
+ * Reprèsente les fonctionnalités d'absences
+ */
+public enum AbsencesFonctionnalite implements EliotFonctionnalites {
+ ABS(true),
+ ABS_SAISIE(true),
+ ABS_CONSULT(true),
+ ABS_STATS(true),
+ ABS_PARAM(true),
+ ABS_PUBLIPOSTAGE(true),
+ ABS_SAISIE_APPELS(true),
+ ABS_SAISIE_APPELS_EN_CLASSE(false),
+ ABS_SAISIE_ABS_RETARDS_DEPARTS(true),
+ ABS_SAISIE_DEMI_PENSION_INTERNAT(true),
+ ABS_SAISIE_INC_PUN_SAN(true),
+ ABS_PARAM_GENERAUX(true),
+ ABS_PARAM_MOTIFS(true),
+ ABS_PARAM_INC_PUN_SAN(true) ,
+ ABS_CONSULT_PARENT(false),
+ ABS_CONSULT_ELEVE(false),
+ ABS_CONSULT_ENSEIGNANT(false)
-package org.lilie.services.eliot.absences.fonctionnalites
+ private AbsencesFonctionnalite() {}
+
+ private AbsencesFonctionnalite(Boolean parametrable) {
+ this.PARAMETRABLE = parametrable
+ }
+
+ private final Boolean PARAMETRABLE
+
+ public String getCode() {
+ return toString()
+ }
+
+ public Boolean isParametrable() {
+ return PARAMETRABLE
+ }
-/**
- * Décrit les fonctionnalités de l'application eliot-absences
- *
- * @author jtra
- */
-public enum AbsencesFonctionnalite {
- SAISIE_ABSENCES_CPE,
- SAISIE_ABSENCES_PROF,
- SAISIE_ABSENCES, //Saisie par un CPE ou un prof (accès aux méthodes communes)
- SAISIE_HEBDOMADAIRE_PAR_CLASSE,
- SAISIE_HEBDOMADAIRE_PAR_ELEVE,
- SAISIE_COLLECTIVE,
- SAISIE_DISPENSES,
- SAISIE_INCIDENTS,
- SAISIE_PUNITIONS,
- SAISIE_SANCTIONS,
- SAISIE_INTERNAT,
- SAISIE_DEMI_PENSION,
- STATISTIQUES_TEMPS_REEL,
- STATISTIQUES_TABLEAU_DE_BORD,
- STATISTIQUES_HEBDOMADAIRE,
- PARAMETRAGE_MOTIF,
- PARAMETRAGE_GENERAL,
- PARAMETRAGE_IPS,
- PARAMETRAGE_MODELEDOCUMENT,
- PUBLIPOSTAGE_SELECTION,
- PUBLIPOSTAGE_SUIVI_PAR_ELEVE,
- PUBLIPOSTAGE_SUIVI_IMPRESSION,
- CONSULTATION_ABSENCES, //Consultation par un CPE ou un prof (accès aux méthodes communes)
- CONSULTATION_ABSENCES_PARENT, // Consultation par un parent
- CONSULTATION_ABSENCES_ELEVE, // Consultation par un élève
- CONSULTATION_ABSENCES_ENSEIGNANT, // Consultation par un enseignant
- CONSULTATION_APPELS_OUBLIES,
- CONSULTATION_REGISTRE_MENSUEL,
- NOTIFICATION_PREFERNCE_UTILISATEUR
}
\ No newline at end of file
package org.lilie.services.eliot.droits
import org.lilie.services.eliot.scolarite.Etablissement
-import org.lilie.services.eliot.fonctionnalites.EliotFonctionnalite
import org.lilie.services.eliot.securite.AutorisationException
import org.lilie.services.eliot.annuaire.SecuriteSession
import org.lilie.services.eliot.annuaire.FonctionEnum
+import org.lilie.services.eliot.securite.fonctionnalite.FonctionService
+import org.lilie.services.eliot.securite.fonctionnalite.TypeFonctionEnum
+import org.lilie.services.eliot.annuaire.EliotFonctionnalites
class EliotDroitsService {
static transactional = true
+ FonctionService fonctionService
+
/**
* Retourne la liste des fonctionnalités de l'application
- * @return une List<EliotFonctionnalite>
+ * @return une List<EliotFonctionnalites>
* @author jbui
*/
- protected List<EliotFonctionnalite> getFonctionnalites() {
+ protected List<EliotFonctionnalites> getFonctionnalites() {
return []
}
*/
protected Boolean getDroitFonctionnalite(SecuriteSession securiteSession,
Etablissement etablissement,
- EliotFonctionnalite fonctionnalite) {
+ EliotFonctionnalites fonctionnalite) {
return true
}
) {
HashSet fonctionnalitesAccessibles = []
- List<EliotFonctionnalite> listeFonctionnalites = getFonctionnalites()
+ List<EliotFonctionnalites> listeFonctionnalites = getFonctionnalites()
- for (EliotFonctionnalite fonctionnalite: listeFonctionnalites) {
+ for (EliotFonctionnalites fonctionnalite: listeFonctionnalites) {
if (getDroitFonctionnalite(
- securiteSession,
- etablissement,
- fonctionnalite
+ securiteSession,
+ etablissement,
+ fonctionnalite
)
) {
fonctionnalitesAccessibles.add(fonctionnalite)
return (
securiteSession.hasFonctionIn([
- FonctionEnum.EDUCATION,
- FonctionEnum.DIRECTION,
- FonctionEnum.ADMIN_LOCAL],
- etablissement.id)
- ||
- securiteSession.hasFonctionIn(
- [FonctionEnum.CORRESPONDANT_DEPLOIEMENT]
- )
+ FonctionEnum.EDUCATION,
+ FonctionEnum.DIRECTION,
+ FonctionEnum.ADMIN_LOCAL],
+ etablissement.id)
+ ||
+ securiteSession.hasFonctionIn(
+ [FonctionEnum.CORRESPONDANT_DEPLOIEMENT]
+ )
)
}
action.throwException()
}
+
+ void verifieDroitSurFonctionnaliteParametrable(SecuriteSession securiteSession,
+ Etablissement etablissement,
+ EliotFonctionnalites fonctionnalite,
+ Closure verifieDroitFonctionsNonParametrables){
+
+ TypeFonctionEnum typeFonctions = fonctionService.getTypeFonctions(securiteSession, etablissement)
+
+ if (TypeFonctionEnum.NON_PARAMETRABLES == typeFonctions){
+ verifieDroitFonctionsNonParametrables()
+ } else if (TypeFonctionEnum.PARAMETRABLES == typeFonctions){
+ securiteSession.verifieAccesFonctionnalite(fonctionnalite, etablissement?.id)
+ } else {
+ try {
+ verifieDroitFonctionsNonParametrables()
+ } catch(AutorisationException e){
+ securiteSession.verifieAccesFonctionnalite(fonctionnalite, etablissement?.id)
+ }
+ }
+
+ }
+
+ boolean hasDroitSurFonctionnaliteParametrable( SecuriteSession securiteSession,
+ Etablissement etablissement,
+ EliotFonctionnalites fonctionnalite,
+ Closure hasDroitFonctionsNonParametrables){
+
+ TypeFonctionEnum typeFonctions = fonctionService.getTypeFonctions(securiteSession, etablissement)
+
+ if (TypeFonctionEnum.NON_PARAMETRABLES == typeFonctions){
+ return hasDroitFonctionsNonParametrables()
+ }
+
+ else if (TypeFonctionEnum.PARAMETRABLES == typeFonctions){
+ return securiteSession.hasAccesFonctionnalite(fonctionnalite, etablissement?.id)
+ }
+
+ else {
+ return hasDroitFonctionsNonParametrables() ||
+ securiteSession.hasAccesFonctionnalite(fonctionnalite, etablissement?.id)
+ }
+
+ }
}
String resultat = "EtatArbre : \n"
branchesOuvertes.each {
Noeud n, Chemin c ->
- resultat += "Noeud " + n + " --> " + c + "\n"
+ resultat += "FonctionnaliteFonctionnalite " + n + " --> " + c + "\n"
}
return resultat += "FinEtatArbre\n"
}
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+
+
+package org.lilie.services.eliot.menu
+
+import org.lilie.services.eliot.annuaire.SecuriteSession
+import org.lilie.services.eliot.scolarite.Etablissement
+import org.lilie.services.eliot.annuaire.FonctionEnum
+import org.springframework.context.ApplicationContext
+
+/**
+ * Classe utilitaire permettant de définir des comportements spéciaux pour des éléments de menu
+ * Le principe est de dériver cette classe et surcharger 3 méthodes
+ */
+abstract class AbstractMenu {
+
+/**
+ * Indique si on a l'autorisation ou non de construire l'élément de menu. Par défaut on a toujours le droit
+ * d'avoir l'entrée dans le menu.
+ * @return
+ */
+ public Boolean autoriseAjoutElementMenu(){
+ true
+ }
+
+ /**
+ * Retourne l'élément de menu contruit
+ * @return
+ */
+ abstract public MenuItemInfo construitMenuItem(Object pageCourante)
+
+ /**
+ * Au cas où un descendant a besoin d'initialiser des données avant de construire son menu
+ */
+ public void initialise() {
+
+ }
+
+ ApplicationContext applicationContext
+ SousMenu menuItemInfoEnum
+ Entete menuEntete
+ Etablissement etablissement
+ SecuriteSession securiteSession
+
+ /**
+ * TOREFACT : doit retourner dans DroitService ?
+ * @return
+ */
+ public Boolean isDirectionAdminLocalOuCorrespondant() {
+ return (
+ isDirection()
+ ||
+ securiteSession.hasFonctionIn(
+ [FonctionEnum.ADMIN_LOCAL],
+ etablissement.id
+ ) ||
+ securiteSession.hasFonctionIn(
+ [FonctionEnum.CORRESPONDANT_DEPLOIEMENT],
+ etablissement.id
+ )
+ )
+
+ }
+
+ /**
+ * TOREFACT : doit retourner dans DroitService ?
+ * @return
+ */
+ public Boolean isDirectionAdminLocalCorrespondantOuEducation() {
+
+ return (isDirectionAdminLocalOuCorrespondant() ||
+ (securiteSession.hasFonctionIn(
+ [FonctionEnum.EDUCATION],
+ etablissement.id
+ ))
+ )
+
+ }
+
+ /**
+ * TOREFACT : doit retourner dans DroitService ?
+ * @return
+ */
+ public Boolean isDirection() {
+ securiteSession.hasFonctionIn([FonctionEnum.DIRECTION])
+ }
+
+}
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+package org.lilie.services.eliot.menu
+
+import org.lilie.services.eliot.annuaire.EliotFonctionnalites
+
+public interface Entete {
+
+ public String codeLabel
+ public String controleur
+ public String action
+ public String menuType
+ public Object page
+ public EliotFonctionnalites fonctionnalite
+ public Class menuSpecial
+
+
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+package org.lilie.services.eliot.menu
+
+class MenuApplication {
+ // infos pour les entêtes de menu
+ List<Entete> entetes
+ // liste des infos des sous-menus
+ List<SousMenu> sousMenus
+}
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+package org.lilie.services.eliot.menu
+
+class MenuEtablissement extends AbstractMenu {
+
+ public MenuItemInfo construitMenuItem(Object pageCourante) {
+
+ EtablissementMenuItemInfo menuEtab = new EtablissementMenuItemInfo(
+ securiteSession,
+ etablissement,
+ 'eliot.scolarite.menu.etablissements.titrePrincipal',
+ pageCourante
+ )
+
+ if (!menuEtab.isEmpty()) {
+ return menuEtab
+ }
+
+ return null
+ }
+
+}
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+package org.lilie.services.eliot.menu
+
+import org.lilie.services.eliot.scolarite.Etablissement
+import org.springframework.context.ApplicationContext
+import org.springframework.context.ApplicationContextAware
+import org.lilie.services.eliot.annuaire.EliotFonctionnalites
+import org.lilie.services.eliot.annuaire.SecuriteSession
+
+class MenuService implements ApplicationContextAware {
+
+ @SuppressWarnings('GrailsStatelessService')
+ ApplicationContext applicationContext
+
+ /**
+ * Retourne les informations de construction du menu
+ * @param securiteSession : session courante
+ * @param pageCourante : page courante (pour selection dans menu)
+ * @param allFonctionnaliteAutorisees : liste des fonctionnalités autorisée pour la session courante
+ * @param menuApplication : description du menu de l'application
+ * @return
+ */
+ public MenuInfo getMenuInfo(SecuriteSession securiteSession,
+ Object pageCourante,
+ List<EliotFonctionnalites> allFonctionnaliteAutorisees,
+ MenuApplication menuApplication
+ ) {
+
+ Etablissement etablissement = getEtablissementCourant(securiteSession)
+
+ List<Entete> entetes = menuApplication.entetes
+ List<SousMenu> sousMenus = menuApplication.sousMenus
+
+ MenuInfo menuInfo = new MenuInfo()
+
+ entetes.each {
+ Entete menuEntete ->
+
+ if (!allFonctionnaliteAutorisees.find {it.code == menuEntete.fonctionnalite.code}) {
+ return
+ }
+
+ MenuItemInfo menuItemEntete = creeEnteteMenu(
+ securiteSession,
+ etablissement,
+ menuEntete,
+ pageCourante,
+ allFonctionnaliteAutorisees)
+
+ if (!menuItemEntete) {
+ return
+ }
+
+ List<SousMenu> listeMenu = findAllSousMenu(menuEntete, sousMenus)
+
+ log.debug "Liste sous-menu " + listeMenu.toString()
+ log.debug "Liste fonctionnalités autorisée " + allFonctionnaliteAutorisees
+
+ listeMenu.each { SousMenu menuItemInfoEnum ->
+
+ AbstractMenu menu = creeSousMenuFactory(
+ securiteSession,
+ etablissement,
+ menuItemInfoEnum
+ )
+
+ menu.initialise()
+
+ Boolean fonctionnaliteAutorise =
+ ((allFonctionnaliteAutorisees.find {it.code == menuItemInfoEnum.fonctionnalite.code}) != null)
+
+ if (fonctionnaliteAutorise) {
+ log.debug "$menuItemInfoEnum.fonctionnalite.code autorisé."
+ }
+
+ if (menu.autoriseAjoutElementMenu() && (fonctionnaliteAutorise)) {
+
+ MenuItemInfo sousMenuItem = menu.construitMenuItem(pageCourante)
+ if (sousMenuItem) {
+ menuItemEntete.items << sousMenuItem
+ }
+
+ }
+
+ }
+ menuInfo.items << menuItemEntete
+
+ }
+ return menuInfo
+ }
+
+ /**
+ *
+ * @param securiteSession
+ * @return
+ */
+ private Etablissement getEtablissementCourant(SecuriteSession securiteSession) {
+
+ Long etabId = securiteSession.etablissementCourant.id
+ return Etablissement.get(etabId)
+
+ }
+
+ /**
+ *
+ * @param securiteSession
+ * @param etablissement
+ * @param menuEntete
+ * @param pageCourante
+ * @param allFonctionnalite
+ * @return
+ */
+ private MenuItemInfo creeEnteteMenu(SecuriteSession securiteSession,
+ Etablissement etablissement,
+ Entete menuEntete,
+ Object pageCourante,
+ List<EliotFonctionnalites> allFonctionnalite) {
+
+ MenuItemInfo menuItemEntete = null
+
+ if (menuEntete.menuSpecial) {
+
+ AbstractMenu menu = creeMenuFactory(
+ securiteSession,
+ etablissement,
+ menuEntete)
+
+
+ menu.initialise()
+
+ Boolean fonctionnaliteAutorise =
+ ((allFonctionnalite.find {it.code == menuEntete.fonctionnalite.code}) != null)
+
+ if (menu.autoriseAjoutElementMenu() && (fonctionnaliteAutorise)) {
+ menuItemEntete = menu.construitMenuItem(pageCourante)
+ }
+
+
+ } else {
+
+ menuItemEntete = creeMenuNormal(
+ pageCourante,
+ menuEntete
+ )
+
+ }
+ menuItemEntete
+ }
+
+ /**
+ *
+ * @param securiteSession
+ * @param etablissement
+ * @param menuItemInfoEnum
+ * @return
+ */
+ private AbstractMenu creeSousMenuFactory(SecuriteSession securiteSession,
+ Etablissement etablissement,
+ SousMenu menuItemInfoEnum) {
+
+ Class classeMenu = getMenuFactoryClasse(menuItemInfoEnum)
+
+ AbstractMenu menu =
+ (AbstractMenu) classeMenu.newInstance(
+ applicationContext: applicationContext,
+ menuItemInfoEnum: menuItemInfoEnum,
+ etablissement: etablissement,
+ securiteSession: securiteSession
+ )
+
+ menu
+ }
+
+ /**
+ *
+ * @param menuEntete
+ * @return
+ */
+ private List<SousMenu> findAllSousMenu(Entete entete, List<SousMenu> sousMenus) {
+ List<SousMenu> listeMenu = sousMenus.findAll {
+ SousMenu sousMenu ->
+ (sousMenu.menuEnteteEnum == entete)
+ }
+ listeMenu
+ }
+
+ /**
+ *
+ * @param securiteSession
+ * @param etablissement
+ * @param menuEntete
+ * @return
+ */
+ private AbstractMenu creeMenuFactory(SecuriteSession securiteSession,
+ Etablissement etablissement,
+ Entete menuEntete) {
+ AbstractMenu menu =
+ (AbstractMenu) menuEntete.menuSpecial.newInstance(
+ applicationContext: applicationContext,
+ menuEntete: menuEntete,
+ etablissement: etablissement,
+ securiteSession: securiteSession
+ )
+ return menu
+ }
+
+ /**
+ *
+ * @param pageCourante
+ * @param menuEntete
+ * @return
+ */
+ private MenuItemInfo creeMenuNormal(Object pageCourante, Entete menuEntete) {
+ MenuItemInfo menuItemInfo = new MenuItemInfo(
+ selectionne: (pageCourante == menuEntete.page),
+ menuType: 'menuitem',
+ controleur: menuEntete.controleur,
+ action: menuEntete.action,
+ codeLabel: menuEntete.codeLabel
+ )
+ return menuItemInfo
+ }
+
+ /**
+ *
+ * @param menuItemInfoEnum
+ * @return
+ */
+ private Class getMenuFactoryClasse(SousMenu menuItemInfoEnum) {
+ Class classeMenuFactory = menuItemInfoEnum.menuSpecial
+ if (!classeMenuFactory) {
+ classeMenuFactory = SousMenuNormal
+ }
+ classeMenuFactory
+ }
+
+
+}
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+package org.lilie.services.eliot.menu
+
+import org.lilie.services.eliot.annuaire.EliotFonctionnalites
+
+public interface SousMenu {
+
+ public String codeLabel
+ public String controleur
+ public String action
+ public Object page
+ public EliotFonctionnalites fonctionnalite
+ public Entete menuEnteteEnum
+ public Class menuSpecial
+
+
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+
+
+package org.lilie.services.eliot.menu
+
+class SousMenuNormal extends AbstractMenu {
+
+ public MenuItemInfo construitMenuItem(Object pageCourante) {
+ MenuItemInfo sousMenuItem = new MenuItemInfo(
+ selectionne: (pageCourante == menuItemInfoEnum.page),
+ menuType: 'menuitem',
+ // url:menuEntete
+ controleur: menuItemInfoEnum.controleur,
+ action: menuItemInfoEnum.action,
+ codeLabel: menuItemInfoEnum.codeLabel
+ )
+
+ return sousMenuItem
+
+ }
+
+}
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+package org.lilie.services.eliot.menu
+
+class SousMenuSeparateur extends AbstractMenu {
+
+ MenuItemInfo construitMenuItem(Object pageCourante) {
+ new MenuItemSeparateur()
+ }
+
+}
package org.lilie.services.eliot.notes
+import org.lilie.services.eliot.fonctionnalites.EliotFonctionnalite
import org.lilie.services.eliot.scolarite.StructureEnseignement
import org.lilie.services.eliot.scolarite.Etablissement
import org.lilie.services.eliot.securite.AutorisationException
// Un directeur peut modifier les appréciations de toutes les classes de
// l'établissement
-
- if (securiteSession.hasFonctionIn(
- [
- FonctionEnum.DIRECTION,
- FonctionEnum.CORRESPONDANT_DEPLOIEMENT
- ], classe.etablissement.id)
- ) {
+ if (hasDroitSurFonctionnaliteParametrable(
+ securiteSession,
+ classe.etablissement,
+ NotesFonctionnalite.NOTES_SAISIE_SYNTH_CONSEIL,
+ {
+ return securiteSession.hasFonctionIn(
+ [
+ FonctionEnum.DIRECTION,
+ FonctionEnum.CORRESPONDANT_DEPLOIEMENT
+ ], classe.etablissement.id)
+ }
+ )) {
return true
}
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+
+
+
+
+package org.lilie.services.eliot.notes
+
+import org.lilie.services.eliot.annuaire.EliotFonctionnalites
+
+/**
+ * Reprèsente les fonctionnalités de notes
+ */
+
+public enum NotesFonctionnalite implements EliotFonctionnalites {
+ NOTES(true),
+ NOTES_SAISIE(true),
+ NOTES_CONSULT(true),
+ NOTES_PARAM(true),
+ NOTES_PUBLIPOST(true),
+ NOTES_EXPORT(true),
+ NOTES_SAISIE_SYNTH(true),
+ NOTES_SAISIE_BREVET(true),
+ NOTES_CONSULT_NOTES(true),
+ NOTES_CONSULT_RELEVE_BULLETIN(true),
+ NOTES_CONSULT_APPR(true),
+ NOTES_SAISIE_SYNTH_CONSEIL(true),
+ NOTES_CONSULT_NOTES_MODIF(true)
+
+ private NotesFonctionnalite() {}
+
+ private NotesFonctionnalite(Boolean parametrable) {
+ this.PARAMETRABLE = parametrable
+ }
+
+ private final Boolean PARAMETRABLE
+
+ public String getCode() {
+ return toString()
+ }
+
+ public Boolean isParametrable() {
+ return PARAMETRABLE
+ }
+
+}
\ No newline at end of file
import org.lilie.services.eliot.scolarite.Personne
import org.lilie.services.eliot.annuaire.SecuriteSession
import org.lilie.services.eliot.annuaire.Fonction
-import org.lilie.services.eliot.annuaire.FonctionEtablissement
import org.lilie.services.eliot.notification.NotificationType
import org.lilie.services.eliot.notification.DroitFonction
import org.lilie.services.eliot.notification.ParametrageEtablissement
import org.lilie.services.eliot.notification.NotificationTypeId
import org.lilie.services.eliot.notification.Media
+import org.lilie.services.eliot.securite.fonctionnalite.FonctionService
class NotificationPreferenceUtilisateurService {
static transactional = true
NotificationParametrageService notificationParametrageService
+ FonctionService fonctionService
/**
* Lecture des paramétrages pour une personne
securiteSession.getAllFonctionEtablissement()
//Récupération des fonctions de l'utilisateur
- List<Fonction> allFonction = getAllFonction(securiteSession, etablissement)
+ List<Fonction> allFonction = fonctionService.getAllFonction(securiteSession, etablissement)
//Récupération de toutes les notifications auquelles l'utilisateur a droit (toutes fonctions de l'utilisateur confondues)
List<NotificationType> allNotificationType =
}
- /**
- * Retourne la liste des fonctions de l'utilisateur pour la session courante
- * @param session
- * @return notificationTypePreferenceUtilisateurs
- */
- List<Fonction> getAllFonction(SecuriteSession session,
- Etablissement etablissement) {
-
- List<FonctionEtablissement> allFonctionEtablissementSurEtablissement =
- session.allFonctionEtablissement.grep {
- FonctionEtablissement fonctionEtablissement ->
- return fonctionEtablissement.etablissement.uai == etablissement.uai
- }
-
- List<Fonction> allFonction = Fonction.findAllByCodeInList(
- allFonctionEtablissementSurEtablissement*.fonctionEnum*.code
- )
-
- return allFonction
-
- }
}
*/
class LilieHttpService {
+ static transactional = false
+
private static final String PREFIXE_LOGIN_ADMIN_LOCAL = 'admin.'
private static final String PREFIXE_LOGIN_ADMIN_CENTRAL = 'admincentral.'
private static final String PREFIXE_LOGIN_CORRESPONDANT_DEPLOIEMENT = 'cd.'
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+
+
+
+
+package org.lilie.services.eliot.scolarite
+
+import org.lilie.services.eliot.annuaire.EliotFonctionnalites
+
+/**
+ * Reprèsente les fonctionnalités de scolarité
+ */
+
+public enum ScolariteFonctionnalites implements EliotFonctionnalites {
+
+ SCOL(true),
+ SCOL_EDT(true),
+ SCOL_PARAM(true),
+ SCOL_PARAM_NIV(true),
+ SCOL_PARAM_MATIERES(true),
+ SCOL_PARAM_TYP_ACT_DEV(true),
+ SCOL_PARAM_CAL_HEBDO_ANNU(true),
+ SCOL_PARAM_MODELES_DOC(true),
+ FICHE_ELEVE(true),
+ FICHE_ELEVE_COMMENTAIRE(true),
+ FICHE_ELEVE_ABSENCES(true),
+ FICHE_ELEVE_SANCTIONS(true),
+ FICHE_ELEVE_NOTES(true),
+ FICHE_ELEVE_CONSEIL(true),
+ PARAMETRAGE_TYPES_ACTIVITES_DEVOIRS(false),
+ PARAMETRAGE_LIAISON_SSO(false),
+ PARAMETRAGE_NOTIFICATION(false),
+ PARAMETRAGE_ACCES_FONCTIONS(false),
+ NOTIFICATION_PREFERNCE_UTILISATEUR(false),
+ MAGISTER(false),
+ ETABLISSEMENT(false)
+
+
+ private ScolariteFonctionnalites() {}
+
+ private ScolariteFonctionnalites(Boolean parametrable) {
+ this.PARAMETRABLE = parametrable
+ }
+
+ private final Boolean PARAMETRABLE
+
+ public String getCode() {
+ return toString()
+ }
+
+ public Boolean isParametrable() {
+ return PARAMETRABLE
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+package org.lilie.services.eliot.securite.fonctionnalite
+
+import org.lilie.services.eliot.annuaire.EliotFonctionnalites
+
+import org.lilie.services.eliot.notes.NotesFonctionnalite
+import org.lilie.services.eliot.absences.AbsencesFonctionnalite
+import org.lilie.services.eliot.scolarite.ScolariteFonctionnalites
+
+
+class EliotFonctionnaliteFactory {
+
+ public static EliotFonctionnalites parseFromCode(String code) {
+ EliotFonctionnalites eliotFonctionnalite = null
+
+ eliotFonctionnalite = parseFromCode(AbsencesFonctionnalite, code)
+ if (eliotFonctionnalite) {
+ return eliotFonctionnalite
+ }
+
+ eliotFonctionnalite = parseFromCode(NotesFonctionnalite, code)
+ if (eliotFonctionnalite) {
+ return eliotFonctionnalite
+ }
+
+ eliotFonctionnalite = parseFromCode(ScolariteFonctionnalites, code)
+ if (eliotFonctionnalite) {
+ return eliotFonctionnalite
+ }
+
+ return eliotFonctionnalite
+ }
+
+ static private EliotFonctionnalites parseFromCode(def fonctionnalitesEnum, code) {
+ return (EliotFonctionnalites) fonctionnalitesEnum.find {
+ it.getCode() == code
+ }
+ }
+
+}
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+package org.lilie.services.eliot.securite.fonctionnalite
+
+import org.lilie.services.eliot.scolarite.Etablissement
+import org.lilie.services.eliot.annuaire.SecuriteSession
+import org.lilie.services.eliot.annuaire.FonctionEtablissement
+import org.lilie.services.eliot.annuaire.Fonction
+import org.lilie.services.eliot.annuaire.FonctionEnum
+
+/**
+ *
+ * @author othe
+ */
+class FonctionService {
+
+
+ /**
+ * Retourne la liste des fonctions de l'utilisateur pour la session courante
+ * @param session
+ * @return notificationTypePreferenceUtilisateurs
+ */
+ List<Fonction> getAllFonction(SecuriteSession session,
+ Etablissement etablissement) {
+
+ List<FonctionEtablissement> allFonctionEtablissementSurEtablissement =
+ session.getAllFonctionEtablissement()
+
+ List<Fonction> allFonction = Fonction.findAllByCodeInList(
+ allFonctionEtablissementSurEtablissement*.fonctionEnum*.code
+ )
+
+ return allFonction
+
+ }
+
+ TypeFonctionEnum getTypeFonctions(SecuriteSession securiteSession, Etablissement etablissement){
+ List<Fonction> fonctionList = getAllFonction(securiteSession, etablissement)
+ List<FonctionEnum> fonctionEnumList = []
+ fonctionList.each{
+ fonctionEnumList.add(FonctionEnum.parseFromCode(it.code))
+ }
+ int fonctionEnumListSize = fonctionEnumList.size()
+ if (fonctionEnumListSize == fonctionEnumList.findAll {it.accesParametrable == true}?.size()){
+ return TypeFonctionEnum.PARAMETRABLES
+ } else if (fonctionEnumListSize == fonctionEnumList.findAll {it.accesParametrable == false}?.size()){
+ return TypeFonctionEnum.NON_PARAMETRABLES
+ } else {
+ return TypeFonctionEnum.PARAMETRABLES_ET_NON_PARAMETRABLES
+ }
+ }
+
+}
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+package org.lilie.services.eliot.securite.fonctionnalite
+
+import org.lilie.services.eliot.annuaire.Fonction
+import org.lilie.services.eliot.securite.impl.Fonctionnalite
+import org.lilie.services.eliot.securite.impl.AccesFonctionnaliteFonction
+import org.lilie.services.eliot.scolarite.Etablissement
+
+class FonctionnaliteFonctionService {
+
+
+ public List<AccesFonctionnaliteFonction> getAllFonctionnaliteFonctionSurEtablissement(Etablissement etablissement,
+ Fonction fonction) {
+
+ List<AccesFonctionnaliteFonction> accesFonctionnaliteFonction =
+ AccesFonctionnaliteFonction.findAllByFonctionAndEtablissement(
+ fonction,
+ etablissement)
+
+ }
+
+ public List<AccesFonctionnaliteFonction> getAllAccesFonctionnaliteForAllFonctionSurEtablissement(Etablissement etablissement,
+ List<Fonction> fonction
+ ) {
+
+
+ AccesFonctionnaliteFonction.withCriteria {
+ fonctionnalite{
+ 'eq'('parametrable', true)
+ }
+ 'in'('fonction', fonction)
+ 'eq'('etablissement', etablissement)
+
+ }
+
+
+ }
+
+ public void donneAccesFonctionnaliteFonction(Etablissement etablissement,
+ Fonction fonction,
+ Fonctionnalite fonctionnalite
+ ) {
+
+ AccesFonctionnaliteFonction accesFonctionnaliteFonction =
+ AccesFonctionnaliteFonction.findByFonctionnaliteAndFonctionAndEtablissement(
+ fonctionnalite,
+ fonction,
+ etablissement)
+
+ if (!accesFonctionnaliteFonction) {
+ accesFonctionnaliteFonction = new AccesFonctionnaliteFonction(
+ etablissement: etablissement,
+ fonctionnalite: fonctionnalite,
+ fonction: fonction
+ )
+
+ accesFonctionnaliteFonction.save(flush: true, failOnError: true)
+ }
+
+ }
+
+
+ public void supprimeAccesFonctionnaliteFonction(Etablissement etablissement,
+ Fonction fonction,
+ Fonctionnalite fonctionnalite
+ ) {
+
+ AccesFonctionnaliteFonction accesFonctionnaliteFonction =
+ AccesFonctionnaliteFonction.findByFonctionnaliteAndFonctionAndEtablissement(
+ fonctionnalite,
+ fonction,
+ etablissement)
+
+ if (accesFonctionnaliteFonction) {
+ accesFonctionnaliteFonction.delete()
+ }
+
+ }
+
+
+}
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+
+
+package org.lilie.services.eliot.securite.fonctionnalite
+
+import org.lilie.services.eliot.scolarite.Etablissement
+import org.lilie.services.eliot.scolarite.Personne
+import org.lilie.services.eliot.securite.impl.AccesFonctionnalitePersonne
+import org.lilie.services.eliot.securite.impl.Fonctionnalite
+
+class FonctionnalitePersonneService {
+
+
+ public void donneAccesFonctionnalitePersonne(Personne personne,
+ Etablissement etablissement,
+ Fonctionnalite fonctionnalite
+ ) {
+
+ AccesFonctionnalitePersonne accesFonctionnalitePersonne =
+ AccesFonctionnalitePersonne.findByEtablissementAndFonctionnaliteAndPersonne(
+ etablissement,
+ fonctionnalite,
+ autorite)
+
+ if (!accesFonctionnalitePersonne) {
+ accesFonctionnalitePersonne = new AccesFonctionnalitePersonne(
+ etablissement: etablissement,
+ personne: personne,
+ fonctionnalite: fonctionnalite
+ )
+
+ accesFonctionnalitePersonne.save(flush: true, failOnError: true)
+ }
+
+ }
+
+
+ public void supprimeAccesFonctionnalitePersonne(Personne personne,
+ Etablissement etablissement,
+ Fonctionnalite fonctionnalite
+ ) {
+
+ AccesFonctionnalitePersonne accesFonctionnalitePersonne =
+ AccesFonctionnalitePersonne.findByEtablissementAndFonctionnaliteAndPersonne(
+ etablissement,
+ fonctionnalite,
+ personne)
+
+ if (accesFonctionnalitePersonne) {
+ accesFonctionnalitePersonne.delete()
+ }
+
+ }
+
+}
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+package org.lilie.services.eliot.securite.fonctionnalite
+
+import org.lilie.services.eliot.scolarite.Etablissement
+import org.lilie.services.eliot.securite.impl.AccesFonctionnaliteFonction
+import org.lilie.services.eliot.securite.impl.AccesFonctionnalitePersonne
+import org.lilie.services.eliot.securite.impl.Fonctionnalite
+import org.lilie.services.eliot.annuaire.SecuriteSession
+import org.lilie.services.eliot.annuaire.Fonction
+
+import org.lilie.services.eliot.securite.impl.AccesFonctionnaliteFonctionDefaut
+import org.springframework.dao.DataIntegrityViolationException
+import org.lilie.services.eliot.GormUtils
+import org.lilie.services.eliot.annuaire.EliotFonctionnalites
+
+class SecuriteFonctionnaliteService {
+
+ FonctionService fonctionService
+
+ boolean verifieDroitFonctionnalite(
+ SecuriteSession securiteSession,
+ Etablissement etablissement,
+ Fonctionnalite fonctionnalite
+ ) {
+ List<Fonction> fonctions =
+ fonctionService.getAllFonction(securiteSession, etablissement)
+
+ boolean accesParFontion = false
+ if (!fonctions.isEmpty()) {
+ accesParFontion = AccesFonctionnaliteFonction.createCriteria().get {
+ 'eq'('actif', true)
+ 'eq'('fonctionnalite', fonctionnalite)
+ 'eq'('etablissement', etablissement)
+ 'in'('fonction', fonctions)
+ maxResults(1)
+ } != null
+ }
+
+ boolean accesParPersonne = AccesFonctionnalitePersonne.createCriteria().get {
+ 'eq'('fonctionnalite', fonctionnalite)
+ 'eq'('etablissement', etablissement)
+ 'eq'('personne', securiteSession.personne)
+ maxResults(1)
+ } != null
+
+ return accesParFontion || accesParPersonne
+ }
+
+ Map<Long, HashSet<EliotFonctionnalites>> getMapEnumFonctionnalitesAccessibles(
+ SecuriteSession securiteSession
+ ) {
+ Map<Long, HashSet<EliotFonctionnalites>> fonctionnalitesParametrablesAccessibles =
+ [:]
+
+ List<Etablissement> etablissementsAccessibles =
+ (List<Etablissement>) securiteSession.getEtablissementsAccessibles()
+
+ etablissementsAccessibles?.each { Etablissement etablissement ->
+ fonctionnalitesParametrablesAccessibles.put(
+ etablissement.id,
+ listeEnumFonctionnalitesAccessibles(securiteSession, etablissement)
+ )
+ }
+ return fonctionnalitesParametrablesAccessibles
+
+ }
+
+ HashSet<EliotFonctionnalites> listeEnumFonctionnalitesAccessibles(SecuriteSession securiteSession,
+ Etablissement etablissement) {
+
+ HashSet<EliotFonctionnalites> listEnum = new HashSet<EliotFonctionnalites>()
+
+ List<Fonctionnalite> list = listeFonctionnalitesAccessibles(securiteSession, etablissement)
+ HashSet<String> listCodes = list?.collect {it.code} as Set
+ listCodes?.each {
+ EliotFonctionnalites fonctionnaliteParametrableEnum =
+ EliotFonctionnaliteFactory.parseFromCode(it)
+ if (fonctionnaliteParametrableEnum) {
+ listEnum.add(fonctionnaliteParametrableEnum)
+ }
+ }
+
+ return listEnum
+ }
+
+ List<Fonctionnalite> listeFonctionnalitesAccessibles(SecuriteSession securiteSession,
+ Etablissement etablissement
+ ) {
+ List<Fonctionnalite> fonctionnalitesAccessibles = []
+
+ List<Fonction> fonctions =
+ fonctionService.getAllFonction(securiteSession, etablissement)
+
+ if (!fonctions.isEmpty()) {
+ List<AccesFonctionnaliteFonction> accesFonctionnaliteFonctions =
+ AccesFonctionnaliteFonction.withCriteria {
+ 'eq'('actif', true)
+ 'eq'('etablissement', etablissement)
+ 'in'('fonction', fonctions)
+ }
+
+ fonctionnalitesAccessibles.addAll(
+ accesFonctionnaliteFonctions.collect {it.fonctionnalite})
+ }
+
+ List<AccesFonctionnalitePersonne> accesFonctionnalitePersonnes =
+ AccesFonctionnalitePersonne.withCriteria {
+ 'eq'('etablissement', etablissement)
+ 'eq'('personne', securiteSession.personne)
+ }
+
+ fonctionnalitesAccessibles.addAll(
+ accesFonctionnalitePersonnes.collect {it.fonctionnalite})
+
+ return fonctionnalitesAccessibles
+ }
+
+ List<Fonctionnalite> listeFonctionnalitesAccessibles(
+ SecuriteSession securiteSession,
+ Etablissement etablissement,
+ List<Fonctionnalite> fonctionnalites
+ ) {
+ List<Fonctionnalite> fonctionnalitesAccessibles = []
+
+ if (fonctionnalites.isEmpty()) {
+ return fonctionnalitesAccessibles
+ }
+
+ List<Fonction> fonctions =
+ fonctionService.getAllFonction(securiteSession, etablissement)
+
+ if (!fonctions.isEmpty()) {
+ List<AccesFonctionnaliteFonction> accesFonctionnaliteFonctions = AccesFonctionnaliteFonction.withCriteria {
+ 'eq'('actif', true)
+ 'in'('fonctionnalite', fonctionnalites)
+ 'eq'('etablissement', etablissement)
+ 'in'('fonction', fonctions)
+ }
+
+ fonctionnalitesAccessibles.addAll(
+ accesFonctionnaliteFonctions.collect {it.fonctionnalite})
+ }
+
+ List<AccesFonctionnalitePersonne> accesFonctionnalitePersonnes =
+ AccesFonctionnalitePersonne.withCriteria {
+ 'in'('fonctionnalite', fonctionnalites)
+ 'eq'('etablissement', etablissement)
+ 'eq'('personne', securiteSession.personne)
+ }
+
+ fonctionnalitesAccessibles.addAll(
+ accesFonctionnalitePersonnes.collect {it.fonctionnalite})
+
+ return fonctionnalitesAccessibles
+ }
+
+ public void initialiseEtablissements(SecuriteSession securiteSession) {
+ List<Etablissement> etablissementsAccessibles = (List<Etablissement>) securiteSession.getEtablissementsAccessibles()
+ etablissementsAccessibles?.each { Etablissement etablissement ->
+ // Initialisation des fonctionnalités paramétrables pour les fonctions paramétrables
+ // pour l'établissement
+ initialiseEtablissement(etablissement)
+ }
+ }
+
+ /**
+ * Vérifie que les droits par fonctions paramétrables sur les fonctionnalités paramétrables
+ * existent pour l'étab donné. Sinon, on les créé à partir des droits par défaut
+ * @param etablissement
+ */
+ public void initialiseEtablissement(Etablissement etablissement) {
+
+ log.info "initialiseEtablissement : $etablissement"
+
+ List<AccesFonctionnaliteFonction> liste =
+ AccesFonctionnaliteFonction.findAllByEtablissement(etablissement)
+
+ List<AccesFonctionnaliteFonctionDefaut> listeAccesFonctionnaliteFonctionDefaut =
+ AccesFonctionnaliteFonctionDefaut.findAll()
+
+ if (!liste || liste.size() == 0) {
+ listeAccesFonctionnaliteFonctionDefaut.each {
+ saveAccesFonctionnaliteFonction(it, etablissement)
+ }
+ } else if (liste.size() != listeAccesFonctionnaliteFonctionDefaut.size()) {
+ listeAccesFonctionnaliteFonctionDefaut.each { AccesFonctionnaliteFonctionDefaut droitParDefaut ->
+ boolean existeDroitDansEtab = false
+ liste.each { AccesFonctionnaliteFonction droit ->
+ if (droit.fonction == droitParDefaut.fonction &&
+ droit.fonctionnalite == droitParDefaut.fonctionnalite &&
+ droit.etablissement == etablissement) {
+ existeDroitDansEtab = true
+ }
+ }
+ if (!existeDroitDansEtab) {
+ saveAccesFonctionnaliteFonction(droitParDefaut, etablissement)
+ }
+ }
+ }
+ }
+
+ private void saveAccesFonctionnaliteFonction(AccesFonctionnaliteFonctionDefaut droitParDefaut,
+ Etablissement etablissement) {
+
+ Map param = [
+ fonctionnalite: droitParDefaut.fonctionnalite,
+ fonction: droitParDefaut.fonction,
+ actif: droitParDefaut.actif,
+ etablissement: etablissement
+ ]
+
+ Closure action = {
+ AccesFonctionnaliteFonction accesFonctionnaliteFonction = new AccesFonctionnaliteFonction(
+ fonctionnalite: param.fonctionnalite,
+ fonction: param.fonction,
+ actif: param.actif,
+ etablissement: param.etablissement
+ )
+
+ accesFonctionnaliteFonction.save(flush: true, failOnError: true)
+ }
+
+ Closure onDataIntegrityViolation = {DataIntegrityViolationException e ->
+ AccesFonctionnaliteFonction acces = AccesFonctionnaliteFonction.createCriteria().get {
+ eq('fonctionnalite', param.fonctionnalite)
+ eq('fonction', param.fonction)
+ eq('etablissement', param.etablissement)
+ }
+ if (!acces) {
+ throw e
+ }
+ }
+
+ GormUtils.withSavepoint(action, onDataIntegrityViolation)
+ }
+
+}
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+package org.lilie.services.eliot.securite.fonctionnalite
+
+/**
+ * @author agia
+ */
+public enum TypeFonctionEnum {
+
+ PARAMETRABLES,
+ NON_PARAMETRABLES,
+ PARAMETRABLES_ET_NON_PARAMETRABLES
+
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+package org.lilie.services.eliot.securite.fonctionnalite.saisie
+
+class FonctionParams {
+ String codeFonction
+ Boolean actif
+}
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+package org.lilie.services.eliot.securite.fonctionnalite.saisie
+
+/**
+ * Racine de l'arbre des fonctionnalités
+ * @author othe
+ */
+class FonctionnaliteArbre extends FonctionnaliteNoeud {
+
+ Boolean arbrePersonne = false
+
+ String getCode() {
+ ""
+ }
+
+ public Boolean getArbrePersonne() {
+ this.arbrePersonne
+ }
+
+
+}
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+package org.lilie.services.eliot.securite.fonctionnalite.saisie
+
+
+public enum FonctionnaliteEtat {
+
+ ACTIF_FONCTION,
+ ACTIF_PERSONNE,
+ ACTIF_DEFAUT,
+ INACTIF
+
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+package org.lilie.services.eliot.securite.fonctionnalite.saisie
+
+import org.lilie.services.eliot.annuaire.Fonction
+
+class FonctionnaliteFonctionEtat {
+
+ Fonction fonction
+ FonctionnaliteEtat etat = FonctionnaliteEtat.INACTIF
+
+}
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+package org.lilie.services.eliot.securite.fonctionnalite.saisie
+
+import org.lilie.services.eliot.annuaire.Fonction
+
+/**
+ * FonctionnaliteFonctionnalite pour représenter les noeuds des arbres de fonctionnalité
+ * @author othe
+ */
+class FonctionnaliteFonctionnalite extends FonctionnaliteNoeud {
+
+ List<FonctionnaliteFonctionEtat> etat = []
+
+ FonctionnaliteEtat etatFonctionnalitePersonne = FonctionnaliteEtat.INACTIF
+
+
+ public void ajouteFonction(Fonction fonction, FonctionnaliteEtat fonctionnaliteEtat) {
+
+ FonctionnaliteFonctionEtat fonctionnaliteFonctionEtat = etat.find {it.fonction.id == fonction.id}
+
+ if (fonctionnaliteFonctionEtat) {
+ fonctionnaliteFonctionEtat.etat = fonctionnaliteEtat
+ } else {
+ FonctionnaliteFonctionEtat fonctionEtat = new FonctionnaliteFonctionEtat(
+ fonction: fonction,
+ etat: fonctionnaliteEtat
+ )
+ etat << fonctionEtat
+ }
+
+ }
+
+ public void actifPourUneFonction(Fonction fonction) {
+ ajouteFonction(fonction, FonctionnaliteEtat.ACTIF_FONCTION)
+ }
+
+ public void inactifPourUneFonction(Fonction fonction) {
+ ajouteFonction(fonction, FonctionnaliteEtat.INACTIF)
+ }
+
+
+ public void actifPourPersonne() {
+ etatFonctionnalitePersonne = FonctionnaliteEtat.ACTIF_PERSONNE
+ }
+
+}
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+package org.lilie.services.eliot.securite.fonctionnalite.saisie
+
+class FonctionnaliteGroupe extends FonctionnaliteNoeud {
+}
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+package org.lilie.services.eliot.securite.fonctionnalite.saisie
+
+import org.lilie.services.eliot.securite.impl.Fonctionnalite
+
+/**
+ *
+ */
+class FonctionnaliteNoeud {
+
+ public Boolean getArbrePersonne() {
+ if (parent){
+ return parent.arbrePersonne
+ }
+ false
+ }
+
+ Fonctionnalite fonctionnalite = null
+
+ List<FonctionnaliteNoeud> enfants = []
+
+ FonctionnaliteNoeud parent = null
+
+ String getCode() {
+ if (!fonctionnalite) {
+ throw new IllegalStateException("Un noeud de l'arbre est toujours associé à une fonctionnalité.")
+ }
+ return fonctionnalite.code
+ }
+
+ Integer getOrdre() {
+ if (!fonctionnalite) {
+ throw new IllegalStateException("Un noeud de l'arbre est toujours associé à une fonctionnalité.")
+ }
+ return fonctionnalite.ordre
+ }
+
+ public void sort(){
+
+ enfants.sort{
+ it.getOrdre()
+ }
+
+ enfants.each{
+ it.sort()
+ }
+
+ }
+
+ public FonctionnaliteNoeud findNoeudAcces(Fonctionnalite fonctionnalite) {
+
+ FonctionnaliteNoeud resultat = null
+
+ enfants.each {FonctionnaliteNoeud noeudAcces ->
+ Fonctionnalite fonctionnaliteNoeud = noeudAcces.fonctionnalite
+ if (fonctionnaliteNoeud?.code == fonctionnalite.code) {
+ resultat = noeudAcces
+ }
+ }
+
+ if (!resultat) {
+ enfants.each {FonctionnaliteNoeud noeudAcces ->
+ FonctionnaliteNoeud resultatEnfant = noeudAcces.findNoeudAcces(fonctionnalite)
+ if (resultatEnfant) {
+ resultat = resultatEnfant
+ }
+ }
+ }
+
+ return resultat
+
+ }
+
+ public FonctionnaliteNoeud findOrCreate(Fonctionnalite fonctionnalite) {
+
+ FonctionnaliteNoeud resultat = findNoeudAcces(fonctionnalite)
+
+ if (!resultat) {
+ resultat = creeBranche(fonctionnalite)
+ }
+
+ return resultat
+ }
+
+ /**
+ * Construction d'un branche de l'arbre.
+ * @param fonctionnalite
+ * @param typeAcces
+ * @return La feuille de la branche
+ */
+ private FonctionnaliteNoeud creeBranche(Fonctionnalite fonctionnalite) {
+
+ FonctionnaliteNoeud resultat = FonctionnaliteNoeudFactory.creerNoeudFonctionnalite(fonctionnalite)
+
+ Fonctionnalite fonctionnaliteParent = fonctionnalite.parent
+
+
+ if (fonctionnaliteParent) {
+
+ if (!fonctionnaliteParent.parametrable){
+ throw new IllegalStateException("$fonctionnaliteParent non paramétrable parent de $fonctionnalite paramétrable")
+ }
+
+ FonctionnaliteNoeud parent = findOrCreate(fonctionnaliteParent)
+ parent.enfants.add(resultat)
+ resultat.parent = parent
+
+ } else {
+
+ enfants.add(resultat)
+ resultat.parent = this
+
+ }
+
+ resultat
+ }
+
+}
* <http://www.cecill.info/licences.fr.html>.
*/
-package org.lilie.services.eliot.scolarite.menu
+package org.lilie.services.eliot.securite.fonctionnalite.saisie
-import org.lilie.services.eliot.menu.MenuItemInfo
+import org.lilie.services.eliot.securite.impl.Fonctionnalite
/**
- * Crée les items de menu
- * @author jbui
+ * Construction des noeuds pour les arbres de paramétrage des fonctionnalités
+ * @author othe
*/
-class MenuItemInfoFactory {
- private pageCourante
- private Boolean notificationActif
-
- MenuItemInfoFactory(
- def pageCourante,
- Boolean notificationActif
- ) {
- this.pageCourante = pageCourante
- this.notificationActif = notificationActif
- }
+class FonctionnaliteNoeudFactory {
/**
- * @param descriptionItem
- * @return L'item de menu correspondant
+ * La création des noeuds de l'arbre se fait par rapport aux fonctionnalités
+ * @param fonctionnalite
+ * @return
*/
- MenuItemInfo getMenuItemInfo(MenuItemInfoEnum descriptionItem) {
- MenuItemInfo result = new MenuItemInfo(descriptionItem.mapInitialisation)
- result.selectionne = descriptionItem.isSelectionne(
- this.pageCourante,
- this.notificationActif
+ static public FonctionnaliteNoeud creerNoeudFonctionnalite(Fonctionnalite fonctionnalite) {
+
+ if (fonctionnalite.groupe) {
+ return new FonctionnaliteGroupe(
+ fonctionnalite: fonctionnalite
+ )
+ }
+
+ return new FonctionnaliteFonctionnalite(
+ fonctionnalite: fonctionnalite
)
- return result
+
}
+
}
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+package org.lilie.services.eliot.securite.fonctionnalite.saisie
+
+class FonctionnaliteParams {
+
+ String fonctionnaliteId
+
+ List<FonctionParams> parametres = []
+
+}
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+package org.lilie.services.eliot.securite.fonctionnalite.saisie
+
+class FonctionnalitePersonneElement {
+
+ String fonctionnaliteId
+
+ Boolean actif
+
+}
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+package org.lilie.services.eliot.securite.fonctionnalite.saisie
+
+class FonctionnalitePersonneParams {
+
+ Long personneId
+
+ List<FonctionnalitePersonneElement> listeFonctionnalitePersonne=[]
+
+}
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+package org.lilie.services.eliot.securite.fonctionnalite.saisie
+
+import org.lilie.services.eliot.annuaire.Fonction
+import org.lilie.services.eliot.scolarite.Personne
+import org.lilie.services.eliot.annuaire.FonctionEnum
+import org.springframework.context.MessageSource
+import org.codehaus.groovy.grails.commons.ApplicationHolder
+import org.springframework.beans.factory.BeanCreationException
+
+class SaisieFonctionnaliteMarshallerService {
+
+ private static final PREFIXE_LIBELLE_PARAM_FONCTIONNALITE = "fonctionnalite.parametrage."
+
+ public List marshallFonction(FonctionnaliteArbre arbre, Locale locale) {
+
+ List resultat = []
+
+ arbre.sort()
+
+ arbre.enfants.each {FonctionnaliteNoeud noeudEnfant ->
+
+ String groupe = message(
+ locale,
+ PREFIXE_LIBELLE_PARAM_FONCTIONNALITE + noeudEnfant.code
+ )
+
+ Integer niveau = 1
+
+ marshallNoeudFonction(
+ locale,
+ resultat,
+ groupe,
+ noeudEnfant,
+ niveau
+ )
+ }
+
+ return resultat
+
+ }
+
+ public List marshallAllFonctionParametrable(
+ List<Fonction> allFonctionParametrable
+ ) {
+
+ Object[] argsVide = []
+ Locale locale = Locale.FRANCE
+
+ List fonctionsData = []
+
+ allFonctionParametrable.each {Fonction fonction ->
+
+ String codeLibelle = FonctionEnum.parseFromCode(fonction.code).getLibelle()
+
+ String libelle = message(
+ locale,
+ codeLibelle
+ )
+
+ Map datas = [
+ 'id': fonction.id,
+ 'libelle': libelle
+ ]
+ fonctionsData << datas
+
+ }
+
+ return fonctionsData
+ }
+
+ public List marshallallPersonneParametrable(
+ List<Personne> allPersonneParametrable
+ ) {
+
+ List utilisateursData = []
+
+ allPersonneParametrable.each {Personne personne ->
+
+ Map datas = ['id': personne.id, 'libelle': personne.nomAffichage()]
+ utilisateursData << datas
+
+ }
+
+ return utilisateursData
+ }
+
+ private static final String IS_SELECTION = 'isSelectionne'
+ private static final String MODIFIABLE = 'modifiable'
+ private static final String PARAMETRABLE = 'parametrable'
+
+ private Map prepareDonneesNoeudCourant(Locale locale,
+ String groupe,
+ Integer niveau,
+ FonctionnaliteNoeud noeud) {
+
+ Map element = [:]
+
+ element['groupe'] = groupe
+
+ prepareBaliseFonctionnalite(
+ locale,
+ element,
+ noeud,
+ niveau
+ )
+
+ if (noeud.parent) {
+ element['parentId'] = noeud.parent.code
+ } else {
+ element['parentId'] = null
+ }
+
+ element['libelle'] = message(
+ locale,
+ PREFIXE_LIBELLE_PARAM_FONCTIONNALITE + noeud.code
+ )
+
+ return element
+ }
+
+
+ private void prepareBaliseFonctionnalite(Locale locale,
+ Map fonctionnalite,
+ FonctionnaliteNoeud noeud,
+ Integer niveau) {
+
+ fonctionnalite['libelle'] = message(
+ locale,
+ PREFIXE_LIBELLE_PARAM_FONCTIONNALITE + noeud.code
+ )
+
+ fonctionnalite['id'] = noeud.code
+ fonctionnalite['niveau'] = niveau
+
+ if (noeud instanceof FonctionnaliteFonctionnalite) {
+
+ ajouteBaliseFonction(
+ noeud,
+ fonctionnalite
+ )
+
+ } else {
+ fonctionnalite[PARAMETRABLE] = false
+ }
+
+ }
+
+ private void ajouteBaliseFonction(FonctionnaliteFonctionnalite noeud, Map element) {
+
+ FonctionnaliteFonctionnalite fonctionnaliteFonctionnalite = (FonctionnaliteFonctionnalite) noeud
+
+ if (noeud.arbrePersonne) {
+
+ marshallArbrefonctionnalitePersonne(
+ element,
+ fonctionnaliteFonctionnalite
+ )
+
+ } else {
+
+ marshallArbreFonctionnaliteFonction(
+ fonctionnaliteFonctionnalite,
+ element
+ )
+
+ }
+
+ }
+
+ private void marshallArbrefonctionnalitePersonne(Map element,
+ FonctionnaliteFonctionnalite fonctionnaliteFonctionnalite) {
+
+ if (fonctionnaliteFonctionnalite.etatFonctionnalitePersonne == FonctionnaliteEtat.ACTIF_PERSONNE) {
+
+ setFonctionnaliteActiveParPersonne(element, fonctionnaliteFonctionnalite)
+
+ } else {
+
+ if (fonctionnaliteFonctionnalite instanceof FonctionnaliteGroupe) {
+
+ desactivePourGroupe(element)
+
+ } else {
+
+ element[PARAMETRABLE] = true
+
+ boolean actifParLesFonctions = isFonctionnaliteActiveParLesFonctions(fonctionnaliteFonctionnalite)
+
+ if (actifParLesFonctions) {
+
+ element[IS_SELECTION] = true
+ element[MODIFIABLE] = false
+
+ } else {
+
+ element[IS_SELECTION] = false
+ element[MODIFIABLE] = true
+
+ }
+
+ }
+ }
+
+ }
+
+ private void marshallArbreFonctionnaliteFonction(FonctionnaliteFonctionnalite fonctionnaliteFonctionnalite,
+ Map element) {
+
+ fonctionnaliteFonctionnalite.etat.each { FonctionnaliteFonctionEtat fonctionnaliteFonctionEtat ->
+ ajouteBaliseEtatFonction(
+ element,
+ fonctionnaliteFonctionEtat
+ )
+ }
+
+ if (fonctionnaliteFonctionnalite instanceof FonctionnaliteGroupe) {
+ element[PARAMETRABLE] = false
+ element[MODIFIABLE] = false
+ } else {
+ element[PARAMETRABLE] = true
+ element[MODIFIABLE] = true
+ }
+
+ }
+
+ private void desactivePourGroupe(Map element) {
+ element[IS_SELECTION] = false
+ element[MODIFIABLE] = false
+ element[PARAMETRABLE] = false
+ }
+
+ private void setFonctionnaliteActiveParPersonne(Map element,FonctionnaliteFonctionnalite fonctionnaliteFonctionnalite) {
+ element[MODIFIABLE]= !isFonctionnaliteActiveParLesFonctions(fonctionnaliteFonctionnalite)
+ element[IS_SELECTION] = true
+ element[PARAMETRABLE] = true
+ }
+
+ private boolean isFonctionnaliteActiveParLesFonctions(FonctionnaliteFonctionnalite fonctionnaliteFonctionnalite) {
+
+ if (fonctionnaliteFonctionnalite.etat.size() == 0) {
+ throw new IllegalStateException("L'utilisateur n'a aucune fonctionnalité.")
+ }
+
+ Boolean actifParLesFonctions = false
+
+ fonctionnaliteFonctionnalite.etat.each {FonctionnaliteFonctionEtat fonctionnaliteFonctionEtat ->
+
+ if (fonctionnaliteFonctionEtat.etat != FonctionnaliteEtat.INACTIF) {
+ actifParLesFonctions = true
+ }
+
+ }
+ actifParLesFonctions
+
+ }
+
+
+ private void ajouteBaliseEtatFonction(Map element, FonctionnaliteFonctionEtat fonctionnaliteFonctionEtat) {
+
+ String key = fonctionnaliteFonctionEtat.fonction.code
+ Boolean isSelectionne = (fonctionnaliteFonctionEtat.etat != FonctionnaliteEtat.INACTIF)
+
+ element[key] = isSelectionne
+
+ }
+
+ private void marshallNoeudFonction(Locale locale,
+ List resultat,
+ String groupe,
+ FonctionnaliteNoeud noeud,
+ Integer niveau) {
+
+ noeud.enfants.each {FonctionnaliteNoeud noeudEnfant ->
+
+ Map element = prepareDonneesNoeudCourant(
+ locale,
+ groupe,
+ niveau,
+ noeudEnfant)
+
+ resultat << element
+
+ marshallNoeudFonction(
+ locale,
+ resultat,
+ groupe,
+ noeudEnfant,
+ niveau + 1)
+ }
+
+ }
+
+ private String message(Locale locale, String code, Object[] args = []) {
+ if (locale) {
+
+ def ctx = ApplicationHolder.getApplication().getMainContext()
+ MessageSource messageSource = (MessageSource) ctx.getBean("messageSource")
+ if (messageSource == null) {
+ throw new BeanCreationException("Pas de bean de gestion i18n")
+ }
+ return messageSource.getMessage(code, args, locale)
+
+ } else {
+ return code
+ }
+ }
+
+
+}
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+
+
+package org.lilie.services.eliot.securite.fonctionnalite.saisie
+
+import org.lilie.services.eliot.securite.impl.Fonctionnalite
+import org.lilie.services.eliot.scolarite.Etablissement
+import org.lilie.services.eliot.annuaire.Fonction
+import org.lilie.services.eliot.securite.impl.AccesFonctionnaliteFonction
+import org.lilie.services.eliot.scolarite.Personne
+import org.lilie.services.eliot.annuaire.FonctionEtablissement
+import org.lilie.services.eliot.securite.impl.AccesFonctionnalitePersonne
+import org.lilie.services.eliot.portail.TypeUtilisateur
+import org.lilie.services.eliot.scolarite.fonction.FonctionAnnuaireService
+import org.lilie.services.eliot.annuaire.FonctionEnum
+
+/**
+ *
+ * @author othe
+ */
+class SaisieFonctionnaliteService {
+
+ FonctionAnnuaireService fonctionAnnuaireService
+
+ public FonctionnaliteArbre getAllAcces(Etablissement etablissement,
+ List<Fonction> fonctions
+ ) {
+
+ FonctionnaliteArbre racine = new FonctionnaliteArbre()
+
+ List<AccesFonctionnaliteFonction> listeFonctionnalite = findAllAccesFonctionnaliteForAllFonctionSurEtablissement(
+ etablissement,
+ fonctions
+ )
+
+ completeArbrePourParametrageFonction(
+ racine,
+ fonctions,
+ listeFonctionnalite,
+ )
+
+ return racine
+ }
+
+ /**
+ * Recherche arbre des fonctionnalités pour une personne sur un établissement
+ * @param etablissement
+ * @param personne
+ * @return
+ */
+ public FonctionnaliteArbre getAllAcces(Etablissement etablissement,
+ Personne personne) {
+
+ FonctionnaliteArbre resultat = construitArbreFonctionnaliteFonctionPourPersonne(
+ personne,
+ etablissement
+ )
+
+ List<Fonctionnalite> listeFonctionnalite = findAllFonctionnaliteSurUnEtablissementPourUnePersonne(
+ etablissement,
+ personne
+ )
+
+ completeArbrePourAccesPersonne(
+ resultat,
+ listeFonctionnalite
+ )
+
+ return resultat
+
+ }
+
+ /**
+ * Recherche toutes les fonctions disponible pour le paramétrage
+ * @return
+ */
+ public List<Fonction> findAllfonction() {
+
+ List<String> allCodeFonctionParametrable = []
+
+ FonctionEnum.each {FonctionEnum fonctionEnum ->
+ if (fonctionEnum.getAccesParametrable()) {
+ allCodeFonctionParametrable << fonctionEnum.getCode()
+ }
+ }
+ List<Fonction> allFonctionParametrable = Fonction.findAllByCodeInList(
+ allCodeFonctionParametrable)
+
+ allFonctionParametrable.sort {it.libelle}
+
+ return allFonctionParametrable
+ }
+
+
+ public void enregistreDroitFonction(Etablissement etablissement,
+ List<FonctionnaliteParams> listeFonctionnaliteParam) {
+
+ listeFonctionnaliteParam.each {
+ FonctionnaliteParams fonctionnaliteParams ->
+
+ Fonctionnalite fonctionnalite = Fonctionnalite.findByCode(fonctionnaliteParams.fonctionnaliteId)
+
+ if (!fonctionnalite) {
+ throw new IllegalStateException("Fonctionnalité $fonctionnaliteParams.fonctionnaliteId inconnue en base.")
+ }
+
+ while (fonctionnalite) {
+
+ fonctionnaliteParams.parametres.each {
+ FonctionParams fonctionParams ->
+ Fonction fonction = Fonction.findByCode(fonctionParams.codeFonction)
+
+ enregistreDroitFonction(etablissement,
+ fonction,
+ fonctionnalite,
+ fonctionParams.actif
+ )
+
+ }
+ fonctionnalite = fonctionnalite.parent
+ }
+
+ }
+
+ }
+
+ private void enregistreDroitFonction(Etablissement etablissement,
+ Fonction fonction,
+ Fonctionnalite fonctionnalite,
+ Boolean actif) {
+
+
+ List<AccesFonctionnaliteFonction> allAccesFonctionnaliteFonction = AccesFonctionnaliteFonction.withCriteria {
+ 'eq'('fonction', fonction)
+ 'eq'('etablissement', etablissement)
+ 'eq'('fonctionnalite', fonctionnalite)
+ }
+
+ AccesFonctionnaliteFonction accesFonctionnaliteFonction = null
+ if (allAccesFonctionnaliteFonction) {
+ accesFonctionnaliteFonction = allAccesFonctionnaliteFonction[0]
+ }
+
+ if (!accesFonctionnaliteFonction) {
+ throw new IllegalStateException("On ne devrait pas accéder au module de paramétrage sans avoir de données établissement.")
+ }
+
+ accesFonctionnaliteFonction.actif = actif
+
+ accesFonctionnaliteFonction.save(flush: true, failOnError: true)
+ }
+
+
+ public enregistreDroitPersonne(Etablissement etablissement,
+ FonctionnalitePersonneParams fonctionnalitePersonneParams) {
+
+ Personne personne = Personne.get(fonctionnalitePersonneParams.personneId)
+
+ fonctionnalitePersonneParams.listeFonctionnalitePersonne.each {FonctionnalitePersonneElement fonctionnalitePersonneElement ->
+
+ Fonctionnalite fonctionnalite = Fonctionnalite.findByCode(fonctionnalitePersonneElement.fonctionnaliteId)
+
+ if (!fonctionnalite) {
+ throw new IllegalStateException("La fonctionnalité $fonctionnalitePersonneElement.fonctionnaliteId n'existe pas.")
+ }
+
+ while (fonctionnalite) {
+
+ enregistreDroitPersonne(
+ etablissement,
+ personne,
+ fonctionnalite,
+ fonctionnalitePersonneElement.actif
+ )
+ fonctionnalite = fonctionnalite.parent
+ }
+
+ }
+
+ }
+
+
+ public enregistreDroitPersonne(Etablissement etablissement,
+ Personne personne,
+ Fonctionnalite fonctionnalite,
+ Boolean actif) {
+
+ List<AccesFonctionnalitePersonne> allAccesFonctionnalitePersonne = AccesFonctionnalitePersonne.withCriteria {
+ 'eq'('personne', personne)
+ 'eq'('etablissement', etablissement)
+ 'eq'('fonctionnalite', fonctionnalite)
+ }
+
+ AccesFonctionnalitePersonne accesFonctionnalitePersonne = null
+ if (allAccesFonctionnalitePersonne) {
+ accesFonctionnalitePersonne = allAccesFonctionnalitePersonne[0]
+ }
+
+ if (actif) {
+
+ if (!accesFonctionnalitePersonne) {
+
+ accesFonctionnalitePersonne = new AccesFonctionnalitePersonne(
+ personne: personne,
+ etablissement: etablissement,
+ fonctionnalite: fonctionnalite
+ )
+
+ accesFonctionnalitePersonne.save(flush: true, failOnError: true)
+
+ }
+
+ } else {
+
+ if (accesFonctionnalitePersonne) {
+ accesFonctionnalitePersonne.delete(flush: true)
+ }
+
+ }
+
+ }
+
+ /**
+ * Recherche tous les utilisateurs concernés par le paramétrage
+ * @return
+ */
+ public List<Personne> findAllPersonne(Etablissement etablissement) {
+
+ List<FonctionEnum> fonctionsUtilisateur =
+ [
+ FonctionEnum.ADMIN_CENTRAL,
+ FonctionEnum.ADMIN_LOCAL,
+ FonctionEnum.CORRESPONDANT_DEPLOIEMENT,
+ FonctionEnum.INVITE,
+ FonctionEnum.EDUCATION,
+ FonctionEnum.DOCUMENTALISTE,
+ FonctionEnum.CONSEILLER_FORMATION_CONTINUE,
+ FonctionEnum.CHEF_TRAVAUX,
+ FonctionEnum.PERSONNEL_ADMINISTRATIF,
+ FonctionEnum.LABORATOIRE,
+ FonctionEnum.ASSISTANT_ETRANGER,
+ FonctionEnum.PERSONNEL_LABORATOIRE,
+ FonctionEnum.PERSONNEL_MEDICO_SOCIAL,
+ FonctionEnum.PERSONNEL_OUVRIER,
+ FonctionEnum.SURVEILLANCE,
+ FonctionEnum.ORIENTATION,
+ FonctionEnum.ASSISTANT_EDUCATION,
+ FonctionEnum.AUXILIAIRE_VIE_SCOLAIRE,
+ FonctionEnum.APPRENTISSAGE
+ ]
+
+ List<Personne> allPersonneParametrable =
+ fonctionAnnuaireService.findAllPersonnesByEtablissementAndAllFonction(
+ etablissement,
+ fonctionsUtilisateur
+ )
+ allPersonneParametrable.sort {it.nomNormalise}
+
+ return allPersonneParametrable
+
+ }
+
+
+ private FonctionnaliteArbre construitArbreFonctionnaliteFonctionPourPersonne(Personne personne,
+ Etablissement etablissement) {
+ FonctionnaliteArbre resultat = new FonctionnaliteArbre(
+ arbrePersonne: true
+ )
+
+ List<Fonction> allFonctionPersonne = findAllFonctionPourPersonneSurEtablissement(personne, etablissement)
+
+ List<AccesFonctionnaliteFonction> listeFonctionnalite =
+ findAllAccesFonctionnaliteForAllFonctionSurEtablissement(
+ etablissement,
+ allFonctionPersonne
+ )
+
+ completeArbrePourParametrageFonction(
+ resultat,
+ allFonctionPersonne,
+ listeFonctionnalite
+ )
+
+ resultat
+ }
+
+ /**
+ * Recherche toutes les fonctionnalités paramétrables
+ * @return
+ */
+ private List<Fonctionnalite> getAllFonctionnaliteParametrable() {
+ Fonctionnalite.findAllByParametrable(true)
+ }
+
+ /**
+ * Ajout d'un arbre pour les fonctionnalités
+ * @param racine
+ * @param listeFonctionnaliteAccessible
+ * @param typeAcces
+ */
+ private void completeArbrePourAccesPersonne(FonctionnaliteArbre racine,
+ List<Fonctionnalite> listeFonctionnaliteCochee
+ ) {
+
+ List<Fonctionnalite> listeFonctionnaliteParametrable = getAllFonctionnaliteParametrable()
+
+ listeFonctionnaliteParametrable.each {
+
+ Fonctionnalite fonctionnaliteParametrable ->
+
+ FonctionnaliteFonctionnalite noeud
+
+ Fonctionnalite fonctionnaliteSelectionne =
+ listeFonctionnaliteCochee.find {it.code == fonctionnaliteParametrable.code}
+
+ if (fonctionnaliteSelectionne) {
+
+ FonctionnaliteNoeud noeudSelectionne = racine.findOrCreate(
+ fonctionnaliteParametrable
+ )
+
+ if (noeudSelectionne instanceof FonctionnaliteFonctionnalite) {
+ (FonctionnaliteFonctionnalite) noeudSelectionne.actifPourPersonne()
+ }
+
+ } else {
+
+ racine.findOrCreate(
+ fonctionnaliteParametrable
+ )
+
+ }
+
+ }
+ }
+
+ private void completeArbrePourParametrageFonction(FonctionnaliteArbre racine,
+ List<Fonction> listeFonction,
+ List<AccesFonctionnaliteFonction> listeFonctionnaliteParFonction) {
+
+ List<Fonctionnalite> listeFonctionnaliteParametrable = getAllFonctionnaliteParametrable()
+
+ listeFonctionnaliteParametrable.each {
+
+ Fonctionnalite fonctionnaliteParametrable ->
+
+ FonctionnaliteNoeud noeudSelectionne = racine.findOrCreate(
+ fonctionnaliteParametrable
+ )
+
+ if (noeudSelectionne instanceof FonctionnaliteFonctionnalite) {
+
+ listeFonction.each {Fonction fonction1 ->
+
+ AccesFonctionnaliteFonction fonctionnaliteSelectionne =
+ listeFonctionnaliteParFonction.find {
+ (it.fonctionnalite.code == fonctionnaliteParametrable.code) &&
+ (fonction1.id == it.fonction.id)
+ }
+
+ if (!fonctionnaliteSelectionne) {
+ throw new IllegalStateException("On ne peut pas accéder au paramétrage si l'établissement n'est pas correctement initialisé")
+ }
+
+ FonctionnaliteFonctionnalite fonctionnaliteFonctionnalite = (FonctionnaliteFonctionnalite) noeudSelectionne
+
+ if (fonctionnaliteSelectionne.actif) {
+ fonctionnaliteFonctionnalite.actifPourUneFonction(fonction1)
+ } else {
+ fonctionnaliteFonctionnalite.inactifPourUneFonction(fonction1)
+ }
+ }
+ }
+ }
+
+ }
+
+ private List<AccesFonctionnaliteFonction> findAllAccesFonctionnaliteForAllFonctionSurEtablissement(Etablissement etablissement,
+ List<Fonction> fonction
+ ) {
+
+ log.debug "Recherche accès au fonctionnalités pour toutes les fonctions sur un établissement $etablissement $fonction"
+
+ AccesFonctionnaliteFonction.withCriteria {
+ fonctionnalite {
+ 'eq'('parametrable', true)
+ }
+ 'in'('fonction', fonction)
+ 'eq'('etablissement', etablissement)
+
+ }
+ }
+
+ private List<Fonction> findAllFonctionPourPersonneSurEtablissement(Personne personne, Etablissement etablissement) {
+
+ List<FonctionEtablissement> fonctionEtablissement =
+ fonctionAnnuaireService.findAllFonctionEtablissementForAutoriteActeur(
+ personne.autorite,
+ TypeUtilisateur.UTILISATEUR_NORMAL
+ )
+
+ List<FonctionEtablissement> allFonctionSurEtablissement = fonctionEtablissement.findAll {FonctionEtablissement fe ->
+ fe.etablissement.id == etablissement.id
+ }
+
+ List<Fonction> allFonctionPersonne = allFonctionSurEtablissement.collect { FonctionEtablissement fe ->
+ Fonction.findByCode(fe.fonctionEnum.getCode())
+ }
+
+ allFonctionPersonne
+ }
+
+ private List<Fonctionnalite> findAllFonctionnaliteSurUnEtablissementPourUnePersonne(Etablissement etablissement,
+ Personne personne
+ ) {
+
+ List<AccesFonctionnalitePersonne> accesFonctionnalitePersonne =
+ AccesFonctionnalitePersonne.withCriteria {
+ fonctionnalite {
+ 'eq'('parametrable', true)
+ }
+ 'eq'('personne', personne)
+ 'eq'('etablissement', etablissement)
+ }
+
+ List<Fonctionnalite> listeFonctionnalite = accesFonctionnalitePersonne.collect {
+ it.fonctionnalite
+ }
+ listeFonctionnalite
+ }
+
+
+}
import org.lilie.services.eliot.annuaire.AnnuairePersonne
import org.lilie.services.eliot.annuaire.RessourceIndexeeInfo
+import org.lilie.services.eliot.annuaire.EliotFonctionnalites
+
/**
* Implémentation par défaut de l'interface SercuriteSession
* Cette implémentation aggrège une ACLSession et une AnnuairesSession, et délègue chaque
return annuaireSession.getGroupesEtendusInfo()
}
+ public void setCacheAllFonctionnaliteParametrableEtablissement(Map<Long, HashSet<EliotFonctionnalites>> fonctionnalitesParametrablesAccessible) {
+ annuaireSession.setCacheAllFonctionnaliteParametrableEtablissement(fonctionnalitesParametrablesAccessible)
+ }
+
+
+ public void verifieAccesFonctionnalite(EliotFonctionnalites fonctionnalite, Long etablissementId) {
+ annuaireSession.verifieAccesFonctionnalite(fonctionnalite, etablissementId)
+ }
+
+ public void verifieAccesFonctionnalitesList(List<EliotFonctionnalites> fonctionnalites, Long etablissementId) {
+ annuaireSession.verifieAccesFonctionnalitesList(fonctionnalites, etablissementId)
+ }
+
+ /**
+ * Détermine si la securiteSession détient le droit d'accès à une fonctionnalité paramétrable donnée
+ */
+ public boolean hasAccesFonctionnalite(EliotFonctionnalites fonctionnalite, Long etablissementId) {
+ return annuaireSession.hasAccesFonctionnalite(fonctionnalite, etablissementId)
+ }
+
+ public boolean hasAccesFonctionnalitesList(List<EliotFonctionnalites> fonctionnalites, Long etablissementId) {
+ annuaireSession.hasAccesFonctionnalitesList(fonctionnalites, etablissementId)
+ }
+
+ List<EliotFonctionnalites> allFonctionnalite(Long etablissementId) {
+ return annuaireSession.allFonctionnalite(etablissementId)
+ }
}
import org.lilie.services.eliot.utils.SpringUtils
import org.lilie.services.eliot.annuaire.FonctionEnum
import org.codehaus.groovy.grails.commons.ConfigurationHolder
+import org.lilie.services.eliot.securite.fonctionnalite.SecuriteFonctionnaliteService
/**
* Factory permettant de créer une securiteSession pour un utilisateur ou pour une autorité
'distantLocalResponsableEleveValidationService'
)
+ SecuriteFonctionnaliteService securiteFonctionnaliteService =
+ (SecuriteFonctionnaliteService) SpringUtils.mainContext.getBean(
+ 'securiteFonctionnaliteService'
+ )
+
+
// Définit si les ACL doivent être gérés avec l'annuaire local ou l'annuaire distant
AnnuaireMode sessionACLmode = null
annuaireSession: annuaireSession
)
+ if (sessionAnnuaireMode == AnnuaireMode.LOCAL){
+ securiteFonctionnaliteService.initialiseEtablissements(securiteSession)
+ securiteSession.setCacheAllFonctionnaliteParametrableEtablissement(
+ securiteFonctionnaliteService.getMapEnumFonctionnalitesAccessibles(securiteSession)
+ )
+ }
+
// Liaison acteur -> securiteSession
securiteSession.acteur.securiteSession = securiteSession
import org.lilie.services.eliot.annuaire.DistantGroupeEtenduService
import org.lilie.services.eliot.annuaire.EtablissementInfo
import org.lilie.services.eliot.DistantAutoriteService
+import org.lilie.services.eliot.annuaire.EliotFonctionnalites
/**
* Implémentation de l'interface AnnuaireSession utilisant l'annuaire distant
listeGroupesEtendus
}
+ void setCacheAllFonctionnaliteParametrableEtablissement(Map<Long, HashSet<EliotFonctionnalites>> fonctionnalitesParametrablesAccessible) {
+ throw new IllegalStateException(
+ "Méthode non implémentée pour l'annuaire distant"
+ )
+ }
+
+
+ public void verifieAccesFonctionnalite(EliotFonctionnalites fonctionnalite, Long etablissementId)
+ throws IllegalStateException {
+ throw new IllegalStateException(
+ "Méthode non implémentée pour l'annuaire distant"
+ )
+ }
+
+ public void verifieAccesFonctionnalitesList(List<EliotFonctionnalites> fonctionnalites, Long etablissementId)
+ throws IllegalStateException {
+ throw new IllegalStateException(
+ "Méthode non implémentée pour l'annuaire distant"
+ )
+ }
+ /**
+ * Détermine si la securiteSession détient le droit d'accès à une fonctionnalité paramétrable donnée
+ */
+ public boolean hasAccesFonctionnalite(EliotFonctionnalites fonctionnalite, Long etablissementId)
+ throws IllegalStateException {
+ throw new IllegalStateException(
+ "Méthode non implémentée pour l'annuaire distant"
+ )
+ }
+ /**
+ * Détermine si la securiteSession détient le droit d'accès sur au moins une des fonctionnalités paramétrables données
+ */
+ public boolean hasAccesFonctionnalitesList(List<EliotFonctionnalites> fonctionnalites, Long etablissementId)
+ throws IllegalStateException {
+ throw new IllegalStateException(
+ "Méthode non implémentée pour l'annuaire distant"
+ )
+ }
+
+ List<EliotFonctionnalites> allFonctionnalite(Long etablissementId) {
+ throw new IllegalStateException(
+ "Méthode non implémentée pour l'annuaire distant"
+ )
+ }
}
import org.lilie.services.eliot.scolarite.fonction.FonctionAnnuaireService
import org.lilie.services.eliot.annuaire.RessourceIndexeeInfo
import org.lilie.services.eliot.annuaire.DistantGroupeEtenduService
+import org.lilie.services.eliot.annuaire.EliotFonctionnalites
/**
* Implémentation de l'interface AnnuaireSession utilisant l'annuaire local
// Service de gestion des données perso (qui sont récupérées par API dans l'annuaire distant)
DistantDonneesPersoService distantDonneesPersoService =
- (DistantDonneesPersoService) SpringUtils.mainContext.getBean(
- 'distantDonneesPersoService'
- )
+ (DistantDonneesPersoService) SpringUtils.mainContext.getBean(
+ 'distantDonneesPersoService'
+ )
// service des groupes étendus (basé sur l'API Logica)
DistantGroupeEtenduService distantGroupeEtenduService =
- (DistantGroupeEtenduService) SpringUtils.mainContext.getBean(
- 'distantGroupeEtenduService'
- )
+ (DistantGroupeEtenduService) SpringUtils.mainContext.getBean(
+ 'distantGroupeEtenduService'
+ )
// liste des groupes étendus associés à la session
private List<RessourceIndexeeInfo> listeGroupesEtendus = []
String codePorteurENT
// Cache des Fonction/Etablissement associées à cette session
- protected cacheAllFonctionEtablissement = null
+ private cacheAllFonctionEtablissement = null
+
+ // Cache des Fonctionnalite paramétrables/Etablissement associées à cette session
+ private cacheAllFonctionnaliteParametrableEtablissement= null
// Cache de l'établissement courant
private Long etablissementCourantId = null
// Service de gestion des personne
LocalPersonneService localPersonneService =
- (LocalPersonneService) SpringUtils.mainContext.getBean(
- 'localPersonneService'
- )
+ (LocalPersonneService) SpringUtils.mainContext.getBean(
+ 'localPersonneService'
+ )
FonctionAnnuaireService fonctionAnnuaireService =
- (FonctionAnnuaireService) SpringUtils.mainContext.getBean(
- 'fonctionAnnuaireService'
- )
-
+ (FonctionAnnuaireService) SpringUtils.mainContext.getBean(
+ 'fonctionAnnuaireService'
+ )
/**
* Construit la session annuaire à partir des informations extraites de la requête & la session HTTP
* @param lilieHttpInfo
listeGroupesEtendus = distantGroupeEtenduService.
findAllGroupeEtenduByIdExterne(
- lilieHttpInfo.personneIdExterne,
- lilieHttpInfo.codePorteurENT
- )
+ lilieHttpInfo.personneIdExterne,
+ lilieHttpInfo.codePorteurENT
+ )
// Traite l'erreur si la personne n'existe pas
if (!personne) {
*/
private Etablissement getEtablissementParDefaut() {
Etablissement etablissementRattachement =
- (Etablissement) getEtablissementRattachement()
+ (Etablissement) getEtablissementRattachement()
if (etablissementRattachement) {
return etablissementRattachement
}
List<Etablissement> etablissementsAccessibles =
- (List<Etablissement>) this.getEtablissementsAccessibles()
+ (List<Etablissement>) this.getEtablissementsAccessibles()
if (etablissementsAccessibles?.size() > 0) {
return etablissementsAccessibles[0]
List<AnnuaireEtablissement> getEtablissementsForFonctions(List<FonctionEnum> fonctionEnums) {
// Sélectionne les rôles qui correspondent aux critères
List<FonctionEtablissement> allFonctionEtablissementMatching =
- (List) this.getAllFonctionEtablissement().findAll {
- FonctionEtablissement fonctionEtablissement ->
- (fonctionEtablissement.fonctionEnum in fonctionEnums)
- }
+ (List) this.getAllFonctionEtablissement().findAll {
+ FonctionEtablissement fonctionEtablissement ->
+ (fonctionEtablissement.fonctionEnum in fonctionEnums)
+ }
return allFonctionEtablissementMatching.collect {
FonctionEtablissement fonctionEtablissement ->
listeGroupesEtendus
}
+ public void setCacheAllFonctionnaliteParametrableEtablissement(Map<Long, HashSet<EliotFonctionnalites>> fonctionnalitesParametrablesAccessible){
+ cacheAllFonctionnaliteParametrableEtablissement = fonctionnalitesParametrablesAccessible
+ }
+
+ public void verifieAccesFonctionnalite(EliotFonctionnalites fonctionnalite, Long etablissementId){
+ if (!hasAccesFonctionnalite(fonctionnalite, etablissementId)){
+ throw AutorisationException.fonctionnaliteException()
+ }
+ }
+
+ public void verifieAccesFonctionnalitesList(List<EliotFonctionnalites> fonctionnalites, Long etablissementId){
+ if (!hasAccesFonctionnalitesList(fonctionnalites, etablissementId)){
+ throw AutorisationException.fonctionnaliteException()
+ }
+ }
+
+ /**
+ * Détermine si la securiteSession détient le droit d'accès à une fonctionnalité paramétrable donnée
+ */
+ public boolean hasAccesFonctionnalite(EliotFonctionnalites fonctionnalite, Long etablissementId){
+ boolean hasAcces = false
+ cacheAllFonctionnaliteParametrableEtablissement?.get(etablissementId)?.each{ EliotFonctionnalites fonctionnaliteCache ->
+ if (fonctionnaliteCache == fonctionnalite){
+ hasAcces = true
+ }
+ }
+ return hasAcces
+ }
+ /**
+ * Détermine si la securiteSession détient le droit d'accès sur au moins une des fonctionnalités paramétrables données
+ */
+ public boolean hasAccesFonctionnalitesList(List<EliotFonctionnalites> fonctionnalites, Long etablissementId){
+ boolean hasAcces = false
+ fonctionnalites?.each{ EliotFonctionnalites fonctionnalite ->
+ if(hasAccesFonctionnalite(fonctionnalites, etablissementId)){
+ hasAcces = true
+ return
+ }
+ }
+ return hasAcces
+ }
+
+ public List<EliotFonctionnalites> allFonctionnalite(Long etablissementId){
+ cacheAllFonctionnaliteParametrableEtablissement?.get(etablissementId).toList()
+ }
+
+
}
import org.lilie.services.eliot.annuaire.Acteur
import org.lilie.services.eliot.annuaire.AnnuairePersonne
import org.lilie.services.eliot.annuaire.RessourceIndexeeInfo
+import org.lilie.services.eliot.annuaire.EliotFonctionnalites
/**
* Implémentation de l'interface AnnuaireSession pour autorite système
class SystemeAnnuaireSession implements AnnuaireSession {
static final String NON_IMPL =
- "Non implémentée pour les autorités systèmes"
+ "Non implémentée pour les autorités systèmes"
String codePorteurENT
AnnuairePersonne getPersonne() {
throw new IllegalStateException(
- "Une session système n'est pas associée à une personne"
+ "Une session système n'est pas associée à une personne"
)
}
public String toString() {
return "SystemeAnnuaireSession{" +
- "codePorteurENT='" + codePorteurENT + '\'' +
- '}';
+ "codePorteurENT='" + codePorteurENT + '\'' +
+ '}';
}
/**
- * Liste des groupes étendus auxquels l'utilisateur a accès
- * @return
- */
+ * Liste des groupes étendus auxquels l'utilisateur a accès
+ * @return
+ */
public List<RessourceIndexeeInfo> getGroupesEtendusInfo() {
[]
}
+
+ public void setCacheAllFonctionnaliteParametrableEtablissement(Map<Long, HashSet<EliotFonctionnalites>> fonctionnalitesParametrablesAccessible)
+ {
+
+ }
+
+ public void verifieAccesFonctionnalite(EliotFonctionnalites fonctionnalite, Long etablissementId) {
+ }
+
+ public void verifieAccesFonctionnalitesList(List<EliotFonctionnalites> fonctionnalites, Long etablissementId){
+ }
+
+ public boolean hasAccesFonctionnalite(EliotFonctionnalites fonctionnalite, Long etablissementId){
+ return true
+ }
+
+ public boolean hasAccesFonctionnalitesList(List<EliotFonctionnalites> fonctionnalites, Long etablissementId){
+ return true
+ }
+
+ public List<EliotFonctionnalites> allFonctionnalite(Long etablissementId){
+ []
+ }
+
+
}
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+
+
+package org.lilie.services.eliot.securite.fonctionnalite
+
+import grails.test.GrailsUnitTestCase
+import org.lilie.services.eliot.annuaire.Fonction
+import org.lilie.services.eliot.test.PopulationTestEtablissement
+import org.lilie.services.eliot.scolarite.Etablissement
+import org.lilie.services.eliot.test.LocalInitDonneesCommunesTestService
+import grails.converters.JSON
+import org.lilie.services.eliot.securite.impl.Fonctionnalite
+import org.lilie.services.eliot.annuaire.FonctionEnum
+import org.lilie.services.eliot.scolarite.Personne
+import org.lilie.services.eliot.test.PopulationTestActeur
+import org.lilie.services.eliot.securite.impl.AccesFonctionnalitePersonne
+import org.lilie.services.eliot.securite.fonctionnalite.saisie.SaisieFonctionnaliteMarshallerService
+import org.lilie.services.eliot.securite.fonctionnalite.saisie.SaisieFonctionnaliteService
+import org.lilie.services.eliot.securite.fonctionnalite.saisie.FonctionnaliteArbre
+
+
+class SaisieFonctionnaliteServiceTests extends GrailsUnitTestCase {
+
+ LocalInitDonneesCommunesTestService localInitDonneesCommunesTestService
+ SaisieFonctionnaliteService saisieFonctionnaliteService
+ SaisieFonctionnaliteMarshallerService saisieFonctionnaliteMarshallerService
+
+ Etablissement etablissement1
+ Fonctionnalite fonctionnalite
+ Fonction fonctionEducation
+ Fonction fonctionAdminLocal
+ Personne personne
+ Fonctionnalite groupe
+
+ protected void setUp() {
+ super.setUp()
+
+ etablissement1 = localInitDonneesCommunesTestService.getEtablissement(
+ PopulationTestEtablissement.ETABLISSEMENT_1)
+
+ fonctionEducation = Fonction.findByCode(FonctionEnum.EDUCATION.code)
+
+ fonctionAdminLocal = Fonction.findByCode(FonctionEnum.ADMIN_LOCAL.code)
+
+ personne = localInitDonneesCommunesTestService.getPersonne(PopulationTestActeur.EDUCATION_1)
+
+ saisieFonctionnaliteService.initialiseEtablissement(etablissement1)
+
+ groupe = Fonctionnalite.findByCode('SCOL_PARAM_MODELES_DOC')
+
+ prepareFonctionnalitePersonne()
+
+ }
+
+ protected void tearDown() {
+ super.tearDown()
+ }
+
+
+ private void prepareFonctionnalitePersonne() {
+
+ AccesFonctionnalitePersonne accesFonctionnalitePersonne = new AccesFonctionnalitePersonne(
+ etablissement: etablissement1,
+ fonctionnalite: groupe,
+ personne: personne
+ )
+
+ accesFonctionnalitePersonne.save(flush: true, failOnError: true)
+ }
+
+ void testConstruireArbreFonction() {
+
+
+ FonctionnaliteArbre arbre = saisieFonctionnaliteService.getAllAcces(
+ etablissement1,
+ [fonctionEducation]
+ )
+
+ println saisieFonctionnaliteMarshallerService.marshallFonction(arbre) as JSON
+ //TODO : à compléter
+
+ }
+
+ void testConstruireArbrePlusieursFonction() {
+
+
+ List<Fonction> listefonction = [fonctionEducation, fonctionAdminLocal]
+
+ FonctionnaliteArbre arbre = saisieFonctionnaliteService.getAllAcces(
+ etablissement1,
+ listefonction
+ )
+
+ println saisieFonctionnaliteMarshallerService.marshallFonction(arbre) as JSON
+ //TODO : à compléter
+
+ }
+
+
+
+ void testConstruireArbreFonctionnalitePersonne() {
+
+ FonctionnaliteArbre arbre = saisieFonctionnaliteService.getAllAcces(
+ etablissement1,
+ personne
+ )
+
+ println saisieFonctionnaliteMarshallerService.marshallFonction(arbre) as JSON
+ //TODO : à compléter
+
+ }
+
+}
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+package org.lilie.services.eliot.securite.fonctionnalite
+
+import grails.test.GrailsUnitTestCase
+import org.lilie.services.eliot.annuaire.Fonction
+import org.lilie.services.eliot.annuaire.FonctionEnum
+import org.lilie.services.eliot.scolarite.Etablissement
+import org.lilie.services.eliot.scolarite.Personne
+import org.lilie.services.eliot.securite.impl.AccesFonctionnaliteFonction
+import org.lilie.services.eliot.securite.impl.AccesFonctionnalitePersonne
+import org.lilie.services.eliot.securite.impl.Fonctionnalite
+import org.lilie.services.eliot.test.LocalInitDonneesCommunesTestService
+import org.lilie.services.eliot.test.PopulationTestActeur
+import org.lilie.services.eliot.test.PopulationTestEtablissement
+import org.lilie.services.eliot.annuaire.SecuriteSession
+
+class SecuriteFonctionnaliteServiceTests extends GrailsUnitTestCase {
+
+ LocalInitDonneesCommunesTestService localInitDonneesCommunesTestService
+ SecuriteFonctionnaliteService securiteFonctionnaliteService
+
+ Etablissement etablissement1
+ Fonctionnalite fonctionnalite
+ Fonction fonctionEducation
+
+ Personne education1
+ SecuriteSession securiteSession
+
+ protected void setUp() {
+ super.setUp()
+
+ education1 = localInitDonneesCommunesTestService.
+ getPersonne(PopulationTestActeur.EDUCATION_1)
+
+ securiteSession = localInitDonneesCommunesTestService.
+ getSecuriteSession(PopulationTestActeur.EDUCATION_1)
+
+ etablissement1 = localInitDonneesCommunesTestService.getEtablissement(
+ PopulationTestEtablissement.ETABLISSEMENT_1)
+
+ fonctionEducation = Fonction.findByCode(FonctionEnum.EDUCATION.code)
+ }
+
+ protected void tearDown() {
+ super.tearDown()
+ }
+
+ void testVerifieDroitFonctionnalite() {
+
+ Fonctionnalite fonctionnalite1 = creeFonctionalite(1)
+
+ new AccesFonctionnaliteFonction(
+ actif: true,
+ fonction: fonctionEducation,
+ fonctionnalite: fonctionnalite1,
+ etablissement: etablissement1
+ ).save(failOnError: true)
+
+ Fonctionnalite fonctionnalite2 = creeFonctionalite(2)
+
+ assertTrue("L'accès à la fonctionnalité n'est pas correct",
+ securiteFonctionnaliteService.verifieDroitFonctionnalite(
+ securiteSession,
+ etablissement1,
+ fonctionnalite1
+ )
+ )
+
+ }
+
+ void testlisteFonctionnalitesAccessibles() {
+
+ Fonctionnalite fonctionnalite1 = creeFonctionalite(1)
+
+ new AccesFonctionnaliteFonction(
+ actif: true,
+ fonction: fonctionEducation,
+ fonctionnalite: fonctionnalite1,
+ etablissement: etablissement1
+ ).save(failOnError: true)
+
+ Fonctionnalite fonctionnalite2 = creeFonctionalite(2)
+
+ new AccesFonctionnalitePersonne(
+ personne: education1,
+ etablissement: etablissement1,
+ fonctionnalite: fonctionnalite2
+ ).save(failOnError: true)
+
+ Fonctionnalite fonctionnalite3 = creeFonctionalite(3)
+
+ List<Fonctionnalite> fonctionnalites = securiteFonctionnaliteService.
+ listeFonctionnalitesAccessibles(securiteSession, etablissement1)
+
+ assertNotNull("L'accès à la fonctionnalité par fonction n'est pas présent",
+ fonctionnalites.find {it.code == fonctionnalite1.code}
+ )
+
+ assertNotNull("L'accès à la fonctionnalité par personne n'est pas présent",
+ fonctionnalites.find {it.code == fonctionnalite2.code}
+ )
+
+ assertNull("L'accès à la fonctionnalité est présent",
+ fonctionnalites.find {it.code == fonctionnalite3.code}
+ )
+ }
+
+ void testlisteFonctionnalitesAccessiblesFiltrees() {
+
+ Fonctionnalite fonctionnalite1 = creeFonctionalite(1)
+
+ new AccesFonctionnaliteFonction(
+ actif: true,
+ fonction: fonctionEducation,
+ fonctionnalite: fonctionnalite1,
+ etablissement: etablissement1
+ ).save(failOnError: true)
+
+ Fonctionnalite fonctionnalite2 = creeFonctionalite(2)
+
+ new AccesFonctionnalitePersonne(
+ personne: education1,
+ etablissement: etablissement1,
+ fonctionnalite: fonctionnalite2
+ ).save(failOnError: true)
+
+ Fonctionnalite fonctionnalite3 = creeFonctionalite(3)
+
+ Fonctionnalite fonctionnalite4 = creeFonctionalite(4)
+
+ new AccesFonctionnaliteFonction(
+ actif: true,
+ fonction: fonctionEducation,
+ fonctionnalite: fonctionnalite4,
+ etablissement: etablissement1
+ ).save(failOnError: true)
+
+ Fonctionnalite fonctionnalite5 = creeFonctionalite(5)
+
+ new AccesFonctionnalitePersonne(
+ personne: education1,
+ etablissement: etablissement1,
+ fonctionnalite: fonctionnalite5
+ ).save(failOnError: true)
+
+ List<Fonctionnalite> fonctionnalites = securiteFonctionnaliteService.listeFonctionnalitesAccessibles(
+ securiteSession,
+ etablissement1,
+ [fonctionnalite1, fonctionnalite2, fonctionnalite3]
+ )
+
+ assertNotNull("L'accès à la fonctionnalité par fonction n'est pas présent",
+ fonctionnalites.find {it.code == fonctionnalite1.code}
+ )
+
+ assertNotNull("L'accès à la fonctionnalité par personne n'est pas présent",
+ fonctionnalites.find {it.code == fonctionnalite2.code}
+ )
+
+ assertNull("L'accès à la fonctionnalité est présent",
+ fonctionnalites.find {it.code == fonctionnalite3.code}
+ )
+
+ assertNull("L'accès à la fonctionnalité hors demande est présent",
+ fonctionnalites.find {it.code == fonctionnalite4.code}
+ )
+
+ assertNull("L'accès à la fonctionnalité hors demande est présent",
+ fonctionnalites.find {it.code == fonctionnalite5.code}
+ )
+ }
+
+ private Fonctionnalite creeFonctionalite(Integer ordre) {
+ Fonctionnalite fonctionnalite = new Fonctionnalite(
+ parametrable: true,
+ code: 'Fonctionnalite' + ordre,
+ groupe: false,
+ ordre: ordre
+ )
+ fonctionnalite.save(failOnError: true)
+ return fonctionnalite
+ }
+
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ ~ This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ ~
+ ~ Lilie is free software. You can redistribute it and/or modify since
+ ~ you respect the terms of either (at least one of the both license) :
+ ~ - under the terms of the GNU Affero General Public License as
+ ~ published by the Free Software Foundation, either version 3 of the
+ ~ License, or (at your option) any later version.
+ ~ - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ ~ License, or any later version
+ ~
+ ~ There are special exceptions to the terms and conditions of the
+ ~ licenses as they are applied to this software. View the full text of
+ ~ the exception in file LICENSE.txt in the directory of this software
+ ~ distribution.
+ ~
+ ~ Lilie is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ Licenses for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License
+ ~ and the CeCILL-C along with Lilie. If not, see :
+ ~ <http://www.gnu.org/licenses/> and
+ ~ <http://www.cecill.info/licences.fr.html>.
+ -->
+
+<databaseChangeLog
+ xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">
+
+ <changeSet id="1" author="othe">
+
+ <comment>
+ Création de la table securite.fonctionnalite
+ </comment>
+
+ <createSequence sequenceName="fonctionnalite_id_seq"
+ schemaName="securite"/>
+
+ <createTable tableName="fonctionnalite" schemaName="securite">
+
+ <column name="id" type="bigint">
+ <constraints primaryKey="true" primaryKeyName="pk_fonctionnalite"
+ nullable="false"/>
+ </column>
+
+ <column name="code" type="varchar(200)">
+ <constraints nullable="false"/>
+ </column>
+
+ <column name="parent_id" type="bigint">
+ <constraints nullable="true"/>
+ </column>
+
+ <column name="parametrable" type="boolean">
+ <constraints nullable="false"/>
+ </column>
+
+ <column name="ordre" type="int">
+ <constraints nullable="false"/>
+ </column>
+
+ <column name="groupe" type="boolean">
+ <constraints nullable="false"/>
+ </column>
+
+ </createTable>
+
+ </changeSet>
+
+ <changeSet id="2" author="othe">
+
+ <comment>
+ Création de la table securite.acces_fonctionnalite_personne
+ </comment>
+
+ <createSequence sequenceName="acces_fonctionnalite_personne_id_seq"
+ schemaName="securite"/>
+
+ <createTable tableName="acces_fonctionnalite_personne" schemaName="securite">
+
+ <column name="id" type="bigint">
+ <constraints primaryKey="true" primaryKeyName="pk_acces_fonctionnalite_personne"
+ nullable="false"/>
+ </column>
+
+ <column name="etablissement_id" type="bigint">
+ <constraints nullable="false"/>
+ </column>
+
+ <column name="fonctionnalite_id" type="bigint">
+ <constraints nullable="false"/>
+ </column>
+
+ <column name="personne_id" type="bigint">
+ <constraints nullable="false"/>
+ </column>
+
+ </createTable>
+
+ <addUniqueConstraint
+ schemaName="securite"
+ tableName="acces_fonctionnalite_personne"
+ constraintName="uk_acces_fonctionnalite_personne"
+ columnNames="etablissement_id,fonctionnalite_id,personne_id" />
+
+ <addForeignKeyConstraint baseTableName="acces_fonctionnalite_personne"
+ baseColumnNames="etablissement_id"
+ baseTableSchemaName="securite"
+ constraintName="fk_acces_fonctionnalite_personne_etablissement"
+ referencedTableName="etablissement"
+ referencedColumnNames="id"
+ referencedTableSchemaName="ent" />
+
+ <addForeignKeyConstraint baseTableName="acces_fonctionnalite_personne"
+ baseColumnNames="fonctionnalite_id"
+ baseTableSchemaName="securite"
+ constraintName="fk_acces_fonctionnalite_personne_fonctionnalite"
+ referencedTableName="fonctionnalite"
+ referencedColumnNames="id"
+ referencedTableSchemaName="securite" />
+
+ <addForeignKeyConstraint baseTableName="acces_fonctionnalite_personne"
+ baseColumnNames="personne_id"
+ baseTableSchemaName="securite"
+ constraintName="fk_acces_fonctionnalite_personne_personne"
+ referencedTableName="personne"
+ referencedColumnNames="id"
+ referencedTableSchemaName="ent" />
+
+
+ </changeSet>
+
+
+
+</databaseChangeLog>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ ~ This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ ~
+ ~ Lilie is free software. You can redistribute it and/or modify since
+ ~ you respect the terms of either (at least one of the both license) :
+ ~ - under the terms of the GNU Affero General Public License as
+ ~ published by the Free Software Foundation, either version 3 of the
+ ~ License, or (at your option) any later version.
+ ~ - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ ~ License, or any later version
+ ~
+ ~ There are special exceptions to the terms and conditions of the
+ ~ licenses as they are applied to this software. View the full text of
+ ~ the exception in file LICENSE.txt in the directory of this software
+ ~ distribution.
+ ~
+ ~ Lilie is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ Licenses for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License
+ ~ and the CeCILL-C along with Lilie. If not, see :
+ ~ <http://www.gnu.org/licenses/> and
+ ~ <http://www.cecill.info/licences.fr.html>.
+ -->
+
+<databaseChangeLog
+ xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">
+
+
+ <changeSet id="1" author="othe">
+
+ <comment>
+ Création de la table securite.acces_fonctionnalite_fonction
+ </comment>
+
+ <createSequence sequenceName="acces_fonctionnalite_fonction_id_seq"
+ schemaName="securite"/>
+
+ <createTable tableName="acces_fonctionnalite_fonction" schemaName="securite">
+
+ <column name="id" type="bigint">
+ <constraints primaryKey="true" primaryKeyName="pk_acces_fonctionnalite_fonction"
+ nullable="false"/>
+ </column>
+
+ <column name="etablissement_id" type="bigint">
+ <constraints nullable="false"/>
+ </column>
+
+ <column name="fonctionnalite_id" type="bigint">
+ <constraints nullable="false"/>
+ </column>
+
+ <column name="fonction_id" type="bigint">
+ <constraints nullable="false"/>
+ </column>
+
+ </createTable>
+
+ <addUniqueConstraint
+ schemaName="securite"
+ tableName="acces_fonctionnalite_fonction"
+ constraintName="uk_acces_fonctionnalite_fonction"
+ columnNames="etablissement_id,fonctionnalite_id,fonction_id" />
+
+ <addForeignKeyConstraint baseTableName="acces_fonctionnalite_fonction"
+ baseColumnNames="etablissement_id"
+ baseTableSchemaName="securite"
+ constraintName="fk_acces_fonctionnalite_fonction_etablissement"
+ referencedTableName="etablissement"
+ referencedColumnNames="id"
+ referencedTableSchemaName="ent" />
+
+ <addForeignKeyConstraint baseTableName="acces_fonctionnalite_fonction"
+ baseColumnNames="fonctionnalite_id"
+ baseTableSchemaName="securite"
+ constraintName="fk_acces_fonctionnalite_fonction_fonctionnalite"
+ referencedTableName="fonctionnalite"
+ referencedColumnNames="id"
+ referencedTableSchemaName="securite" />
+
+ <addForeignKeyConstraint baseTableName="acces_fonctionnalite_fonction"
+ baseColumnNames="fonction_id"
+ baseTableSchemaName="securite"
+ constraintName="fk_acces_fonctionnalite_fonction_fonction"
+ referencedTableName="fonction"
+ referencedColumnNames="id"
+ referencedTableSchemaName="ent" />
+
+
+ </changeSet>
+
+
+
+</databaseChangeLog>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ ~ This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ ~
+ ~ Lilie is free software. You can redistribute it and/or modify since
+ ~ you respect the terms of either (at least one of the both license) :
+ ~ - under the terms of the GNU Affero General Public License as
+ ~ published by the Free Software Foundation, either version 3 of the
+ ~ License, or (at your option) any later version.
+ ~ - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ ~ License, or any later version
+ ~
+ ~ There are special exceptions to the terms and conditions of the
+ ~ licenses as they are applied to this software. View the full text of
+ ~ the exception in file LICENSE.txt in the directory of this software
+ ~ distribution.
+ ~
+ ~ Lilie is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ Licenses for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License
+ ~ and the CeCILL-C along with Lilie. If not, see :
+ ~ <http://www.gnu.org/licenses/> and
+ ~ <http://www.cecill.info/licences.fr.html>.
+ -->
+
+<databaseChangeLog
+ xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">
+
+
+ <changeSet id="1" author="jcok">
+
+ <comment>
+ Alimentation de la table Fonctionnalité
+ </comment>
+
+ <sql>
+
+ <!--APPLICATION SCOLARITE-->
+
+ <!--APPLICATION SCOLARITE-->
+
+ INSERT INTO securite.fonctionnalite (id, code, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'SCOL', true, 0, true);
+
+ <!-- NIVEAU 1 - MENUS-->
+
+ INSERT INTO securite.fonctionnalite (id, code, parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'SCOL_EDT', (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL'), true, 0, false);
+
+ INSERT INTO securite.fonctionnalite (id, code,parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'SCOL_PARAM', (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL'), true, 1, true);
+
+
+ <!-- NIVEAU 2 - SOUS-MENUS DU MENU PARAMETRAGE-->
+
+ INSERT INTO securite.fonctionnalite (id, code, parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'SCOL_PARAM_NIV', (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM'), true, 0, false);
+
+ INSERT INTO securite.fonctionnalite (id, code, parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'SCOL_PARAM_MATIERES', (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM'), true, 1, false);
+
+ INSERT INTO securite.fonctionnalite (id, code, parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'SCOL_PARAM_TYP_ACT_DEV', (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM'), true, 2, false);
+
+ INSERT INTO securite.fonctionnalite (id, code, parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'SCOL_PARAM_CAL_HEBDO_ANNU', (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM'), true, 3, false);
+
+ INSERT INTO securite.fonctionnalite (id, code, parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'SCOL_PARAM_MODELES_DOC', (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM'), true, 5, false);
+
+ <!-- FIN APPLICATION SCOLARITE-->
+
+
+ <!--APPLICATION ABSENCES-->
+
+ INSERT INTO securite.fonctionnalite (id, code, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'ABS', true, 0, true);
+
+ <!-- NIVEAU 1 - MENUS-->
+
+ INSERT INTO securite.fonctionnalite (id, code, parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'ABS_SAISIE', (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS'), true, 0, true);
+
+ INSERT INTO securite.fonctionnalite (id, code,parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'ABS_CONSULT', (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS'), true, 1, false);
+
+ INSERT INTO securite.fonctionnalite (id, code,parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'ABS_STATS', (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS'), true, 2, false);
+
+ INSERT INTO securite.fonctionnalite (id, code,parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'ABS_PARAM', (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS'), true, 3, true);
+
+ INSERT INTO securite.fonctionnalite (id, code,parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'ABS_PUBLIPOSTAGE', (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS'), true, 4, false);
+
+
+ <!-- NIVEAU 2 - SOUS-MENUS DU MENU SAISIE-->
+
+ INSERT INTO securite.fonctionnalite (id, code, parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'ABS_SAISIE_APPELS', (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE'), true, 0, false);
+
+ INSERT INTO securite.fonctionnalite (id, code, parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'ABS_SAISIE_ABS_RETARDS_DEPARTS', (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE'), true, 1, false);
+
+ INSERT INTO securite.fonctionnalite (id, code, parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'ABS_SAISIE_DEMI_PENSION_INTERNAT', (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE'), true, 2, false);
+
+ INSERT INTO securite.fonctionnalite (id, code, parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'ABS_SAISIE_INC_PUN_SAN', (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE'), true, 3, false);
+
+
+ <!-- NIVEAU 2 - SOUS-MENUS DU MENU PARAMETRAGE-->
+
+ INSERT INTO securite.fonctionnalite (id, code, parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'ABS_PARAM_GENERAUX', (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM'), true, 0, false);
+
+ INSERT INTO securite.fonctionnalite (id, code, parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'ABS_PARAM_MOTIFS', (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM'), true, 1, false);
+
+ INSERT INTO securite.fonctionnalite (id, code, parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'ABS_PARAM_INC_PUN_SAN', (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM'), true, 2, false);
+
+
+ <!-- FIN APPLICATION ABSENCES-->
+
+
+ <!--FICHE ELEVE-->
+
+ INSERT INTO securite.fonctionnalite (id, code, parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'FICHE_ELEVE', (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL'), true, 2, true);
+
+ <!-- NIVEAU 1 - ONGLETS-->
+
+ INSERT INTO securite.fonctionnalite (id, code, parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'FICHE_ELEVE_COMMENTAIRE', (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE'), true, 0, false);
+
+ INSERT INTO securite.fonctionnalite (id, code, parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'FICHE_ELEVE_ABSENCES', (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE'), true, 1, false);
+
+ INSERT INTO securite.fonctionnalite (id, code, parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'FICHE_ELEVE_SANCTIONS', (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE'), true, 2, false);
+
+ INSERT INTO securite.fonctionnalite (id, code, parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'FICHE_ELEVE_NOTES', (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE'), true, 3, false);
+
+ INSERT INTO securite.fonctionnalite (id, code, parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'FICHE_ELEVE_CONSEIL', (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE'), true, 4, false);
+
+
+ <!-- FIN FICHE ELEVE-->
+
+ </sql>
+
+ </changeSet>
+
+</databaseChangeLog>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ ~ This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ ~
+ ~ Lilie is free software. You can redistribute it and/or modify since
+ ~ you respect the terms of either (at least one of the both license) :
+ ~ - under the terms of the GNU Affero General Public License as
+ ~ published by the Free Software Foundation, either version 3 of the
+ ~ License, or (at your option) any later version.
+ ~ - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ ~ License, or any later version
+ ~
+ ~ There are special exceptions to the terms and conditions of the
+ ~ licenses as they are applied to this software. View the full text of
+ ~ the exception in file LICENSE.txt in the directory of this software
+ ~ distribution.
+ ~
+ ~ Lilie is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ Licenses for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License
+ ~ and the CeCILL-C along with Lilie. If not, see :
+ ~ <http://www.gnu.org/licenses/> and
+ ~ <http://www.cecill.info/licences.fr.html>.
+ -->
+
+<databaseChangeLog
+ xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">
+
+ <changeSet id="1" author="agia">
+
+ <comment>
+ Ajout colonne 'defaut' dans la table securite.acces_fonctionnalite_fonction
+ </comment>
+
+ <addColumn schemaName="securite" tableName="acces_fonctionnalite_fonction">
+ <column name="defaut" type="boolean" >
+ <constraints nullable="false" />
+ </column>
+ </addColumn>
+
+ <addDefaultValue schemaName="securite" tableName="acces_fonctionnalite_fonction"
+ columnName="defaut"
+ defaultValue="false"/>
+
+ <comment>
+ Supprimer la contrainte non null de etablissement sur la table securite.acces_fonctionnalite_fonction
+ </comment>
+
+ <dropNotNullConstraint schemaName="securite" tableName="acces_fonctionnalite_fonction"
+ columnName="etablissement_id"/>
+
+ <comment>
+ Ajout contrainte unique sur code sur la table securite.fonctionnalite
+ </comment>
+
+ <addUniqueConstraint schemaName="securite" tableName="fonctionnalite"
+ columnNames="code"
+ constraintName="uk_fonctionnalite_code"/>
+
+ <comment>
+ Ajout valeur par défaut pour groupe sur la table securite.fonctionnalite
+ </comment>
+
+ <addDefaultValue schemaName="securite" tableName="fonctionnalite"
+ columnName="groupe"
+ defaultValue="false" />
+
+ </changeSet>
+
+</databaseChangeLog>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ ~ This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ ~
+ ~ Lilie is free software. You can redistribute it and/or modify since
+ ~ you respect the terms of either (at least one of the both license) :
+ ~ - under the terms of the GNU Affero General Public License as
+ ~ published by the Free Software Foundation, either version 3 of the
+ ~ License, or (at your option) any later version.
+ ~ - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ ~ License, or any later version
+ ~
+ ~ There are special exceptions to the terms and conditions of the
+ ~ licenses as they are applied to this software. View the full text of
+ ~ the exception in file LICENSE.txt in the directory of this software
+ ~ distribution.
+ ~
+ ~ Lilie is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ Licenses for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License
+ ~ and the CeCILL-C along with Lilie. If not, see :
+ ~ <http://www.gnu.org/licenses/> and
+ ~ <http://www.cecill.info/licences.fr.html>.
+ -->
+
+<databaseChangeLog
+ xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">
+
+ <changeSet id="1" author="agia">
+
+ <comment>
+ Alimentation de la table securite.fonctionnalite pour le module notes
+ </comment>
+ <sql>
+
+ <!--APPLICATION NOTES-->
+
+ INSERT INTO securite.fonctionnalite (id, code, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'NOTES', true, 0, true);
+
+ <!-- NIVEAU 1 -->
+
+ INSERT INTO securite.fonctionnalite (id, code, parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'NOTES_SAISIE', (SELECT id FROM securite.fonctionnalite WHERE code = 'NOTES'), true, 1, true);
+
+ INSERT INTO securite.fonctionnalite (id, code,parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'NOTES_CONSULT', (SELECT id FROM securite.fonctionnalite WHERE code = 'NOTES'), true, 2, true);
+
+ INSERT INTO securite.fonctionnalite (id, code,parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'NOTES_PARAM', (SELECT id FROM securite.fonctionnalite WHERE code = 'NOTES'), true, 3, false);
+
+ INSERT INTO securite.fonctionnalite (id, code,parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'NOTES_PUBLIPOST', (SELECT id FROM securite.fonctionnalite WHERE code = 'NOTES'), true, 4, false);
+
+ INSERT INTO securite.fonctionnalite (id, code,parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'NOTES_EXPORT', (SELECT id FROM securite.fonctionnalite WHERE code = 'NOTES'), true, 5, false);
+
+
+ <!-- NIVEAU 2 - SOUS-MENUS DU MENU SAISIE-->
+
+ INSERT INTO securite.fonctionnalite (id, code, parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'NOTES_SAISIE_SYNTH', (SELECT id FROM securite.fonctionnalite WHERE code = 'NOTES_SAISIE'), true, 1, false);
+
+ INSERT INTO securite.fonctionnalite (id, code, parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'NOTES_SAISIE_BREVET', (SELECT id FROM securite.fonctionnalite WHERE code = 'NOTES_SAISIE'), true, 2, false);
+
+ <!-- NIVEAU 2 - SOUS-MENUS DU MENU CONSULTATION-->
+
+ INSERT INTO securite.fonctionnalite (id, code, parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'NOTES_CONSULT_NOTES', (SELECT id FROM securite.fonctionnalite WHERE code = 'NOTES_CONSULT'), true, 1, false);
+
+ INSERT INTO securite.fonctionnalite (id, code, parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'NOTES_CONSULT_RELEVE_BULLETIN', (SELECT id FROM securite.fonctionnalite WHERE code = 'NOTES_CONSULT'), true, 2, false);
+
+ INSERT INTO securite.fonctionnalite (id, code, parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'NOTES_CONSULT_APPR', (SELECT id FROM securite.fonctionnalite WHERE code = 'NOTES_CONSULT'), true, 3, false);
+
+
+ <!--NIVEAU 3 - Fonctionnalitées au sein d'une page (CRUD ou autre)-->
+
+ <!--Fonctionnalités de NOTES_SAISIE_SYNTH-->
+
+ INSERT INTO securite.fonctionnalite (id, code, parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'NOTES_SAISIE_SYNTH_CONSEIL', (SELECT id FROM securite.fonctionnalite WHERE code = 'NOTES_SAISIE_SYNTH'), true, 1, false);
+
+ <!--Fonctionnalités de NOTES_CONSULT_NOTES-->
+
+ INSERT INTO securite.fonctionnalite (id, code, parent_id, parametrable, ordre, groupe)
+ VALUES (nextVal('securite.fonctionnalite_id_seq'), 'NOTES_CONSULT_NOTES_MODIF', (SELECT id FROM securite.fonctionnalite WHERE code = 'NOTES_CONSULT_NOTES'), true, 1, false);
+
+ <!-- FIN APPLICATION NOTES-->
+
+ </sql>
+
+ </changeSet>
+
+
+
+</databaseChangeLog>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ ~ This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ ~
+ ~ Lilie is free software. You can redistribute it and/or modify since
+ ~ you respect the terms of either (at least one of the both license) :
+ ~ - under the terms of the GNU Affero General Public License as
+ ~ published by the Free Software Foundation, either version 3 of the
+ ~ License, or (at your option) any later version.
+ ~ - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ ~ License, or any later version
+ ~
+ ~ There are special exceptions to the terms and conditions of the
+ ~ licenses as they are applied to this software. View the full text of
+ ~ the exception in file LICENSE.txt in the directory of this software
+ ~ distribution.
+ ~
+ ~ Lilie is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ Licenses for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License
+ ~ and the CeCILL-C along with Lilie. If not, see :
+ ~ <http://www.gnu.org/licenses/> and
+ ~ <http://www.cecill.info/licences.fr.html>.
+ -->
+
+<databaseChangeLog
+ xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">
+
+ <changeSet id="1" author="agia">
+
+ <comment>
+ Alimentation de la table securite.acces_fonctionnalite_fonction_defaut pour le module notes
+ </comment>
+
+ <sql>
+
+ <!-- Fonctionnalite NOTES -->
+ <!-- fonction AC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AC'),
+ false
+ );
+ <!-- fonction AL -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AL'),
+ true
+ );
+ <!-- fonction CD -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CD'),
+ true
+ );
+ <!-- fonction UI -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'UI'),
+ false
+ );
+ <!-- fonction EDU -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'EDU'),
+ true
+ );
+ <!-- fonction DOC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'DOC'),
+ true
+ );
+ <!-- fonction CFC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CFC'),
+ false
+ );
+ <!-- fonction CTR -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CTR'),
+ true
+ );
+ <!-- fonction ADF -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ADF'),
+ false
+ );
+ <!-- fonction ALB -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ALB'),
+ false
+ );
+ <!-- fonction ASE -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ASE'),
+ false
+ );
+ <!-- fonction LAB -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'LAB'),
+ false
+ );
+ <!-- fonction MDS -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'MDS'),
+ false
+ );
+ <!-- fonction OUV -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'OUV'),
+ false
+ );
+ <!-- fonction SUR -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'SUR'),
+ false
+ );
+ <!-- fonction ORI -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ORI'),
+ false
+ );
+ <!-- fonction AED -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AED'),
+ false
+ );
+ <!-- fonction AVS -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AVS'),
+ false
+ );
+ <!-- fonction APP -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'APP'),
+ false
+ );
+ <!-- fin Fonctionnalite NOTES -->
+
+ <!-- Fonctionnalite NOTES_SAISIE -->
+ <!-- fonction AC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AC'),
+ false
+ );
+ <!-- fonction AL -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AL'),
+ true
+ );
+ <!-- fonction CD -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CD'),
+ true
+ );
+ <!-- fonction UI -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'UI'),
+ false
+ );
+ <!-- fonction EDU -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'EDU'),
+ true
+ );
+ <!-- fonction DOC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'DOC'),
+ true
+ );
+ <!-- fonction CFC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CFC'),
+ false
+ );
+ <!-- fonction CTR -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CTR'),
+ true
+ );
+ <!-- fonction ADF -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ADF'),
+ false
+ );
+ <!-- fonction ALB -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ALB'),
+ false
+ );
+ <!-- fonction ASE -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ASE'),
+ false
+ );
+ <!-- fonction LAB -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'LAB'),
+ false
+ );
+ <!-- fonction MDS -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'MDS'),
+ false
+ );
+ <!-- fonction OUV -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'OUV'),
+ false
+ );
+ <!-- fonction SUR -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'SUR'),
+ false
+ );
+ <!-- fonction ORI -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ORI'),
+ false
+ );
+ <!-- fonction AED -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AED'),
+ false
+ );
+ <!-- fonction AVS -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AVS'),
+ false
+ );
+ <!-- fonction APP -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'APP'),
+ false
+ );
+ <!-- fin Fonctionnalite NOTES_SAISIE -->
+
+ <!-- Fonctionnalite NOTES_CONSULT -->
+ <!-- fonction AC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AC'),
+ false
+ );
+ <!-- fonction AL -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AL'),
+ true
+ );
+ <!-- fonction CD -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CD'),
+ true
+ );
+ <!-- fonction UI -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'UI'),
+ false
+ );
+ <!-- fonction EDU -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'EDU'),
+ true
+ );
+ <!-- fonction DOC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'DOC'),
+ true
+ );
+ <!-- fonction CFC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CFC'),
+ false
+ );
+ <!-- fonction CTR -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CTR'),
+ true
+ );
+ <!-- fonction ADF -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ADF'),
+ false
+ );
+ <!-- fonction ALB -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ALB'),
+ false
+ );
+ <!-- fonction ASE -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ASE'),
+ false
+ );
+ <!-- fonction LAB -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'LAB'),
+ false
+ );
+ <!-- fonction MDS -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'MDS'),
+ false
+ );
+ <!-- fonction OUV -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'OUV'),
+ false
+ );
+ <!-- fonction SUR -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'SUR'),
+ false
+ );
+ <!-- fonction ORI -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ORI'),
+ false
+ );
+ <!-- fonction AED -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AED'),
+ false
+ );
+ <!-- fonction AVS -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AVS'),
+ false
+ );
+ <!-- fonction APP -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'APP'),
+ false
+ );
+ <!-- fin Fonctionnalite NOTES_CONSULT -->
+
+ <!-- Fonctionnalite NOTES_PARAM -->
+ <!-- fonction AC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PARAM'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AC'),
+ false
+ );
+ <!-- fonction AL -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PARAM'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AL'),
+ true
+ );
+ <!-- fonction CD -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PARAM'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CD'),
+ true
+ );
+ <!-- fonction UI -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PARAM'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'UI'),
+ false
+ );
+ <!-- fonction EDU -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PARAM'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'EDU'),
+ false
+ );
+ <!-- fonction DOC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PARAM'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'DOC'),
+ false
+ );
+ <!-- fonction CFC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PARAM'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CFC'),
+ false
+ );
+ <!-- fonction CTR -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PARAM'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CTR'),
+ true
+ );
+ <!-- fonction ADF -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PARAM'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ADF'),
+ false
+ );
+ <!-- fonction ALB -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PARAM'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ALB'),
+ false
+ );
+ <!-- fonction ASE -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PARAM'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ASE'),
+ false
+ );
+ <!-- fonction LAB -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PARAM'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'LAB'),
+ false
+ );
+ <!-- fonction MDS -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PARAM'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'MDS'),
+ false
+ );
+ <!-- fonction OUV -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PARAM'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'OUV'),
+ false
+ );
+ <!-- fonction SUR -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PARAM'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'SUR'),
+ false
+ );
+ <!-- fonction ORI -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PARAM'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ORI'),
+ false
+ );
+ <!-- fonction AED -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PARAM'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AED'),
+ false
+ );
+ <!-- fonction AVS -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PARAM'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AVS'),
+ false
+ );
+ <!-- fonction APP -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PARAM'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'APP'),
+ false
+ );
+ <!-- fin Fonctionnalite NOTES_PARAM -->
+
+ <!-- Fonctionnalite NOTES_PUBLIPOST -->
+ <!-- fonction AC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PUBLIPOST'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AC'),
+ false
+ );
+ <!-- fonction AL -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PUBLIPOST'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AL'),
+ true
+ );
+ <!-- fonction CD -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PUBLIPOST'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CD'),
+ true
+ );
+ <!-- fonction UI -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PUBLIPOST'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'UI'),
+ false
+ );
+ <!-- fonction EDU -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PUBLIPOST'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'EDU'),
+ false
+ );
+ <!-- fonction DOC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PUBLIPOST'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'DOC'),
+ false
+ );
+ <!-- fonction CFC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PUBLIPOST'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CFC'),
+ false
+ );
+ <!-- fonction CTR -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PUBLIPOST'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CTR'),
+ true
+ );
+ <!-- fonction ADF -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PUBLIPOST'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ADF'),
+ false
+ );
+ <!-- fonction ALB -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PUBLIPOST'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ALB'),
+ false
+ );
+ <!-- fonction ASE -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PUBLIPOST'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ASE'),
+ false
+ );
+ <!-- fonction LAB -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PUBLIPOST'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'LAB'),
+ false
+ );
+ <!-- fonction MDS -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PUBLIPOST'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'MDS'),
+ false
+ );
+ <!-- fonction OUV -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PUBLIPOST'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'OUV'),
+ false
+ );
+ <!-- fonction SUR -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PUBLIPOST'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'SUR'),
+ false
+ );
+ <!-- fonction ORI -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PUBLIPOST'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ORI'),
+ false
+ );
+ <!-- fonction AED -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PUBLIPOST'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AED'),
+ false
+ );
+ <!-- fonction AVS -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PUBLIPOST'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AVS'),
+ false
+ );
+ <!-- fonction APP -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_PUBLIPOST'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'APP'),
+ false
+ );
+ <!-- fin Fonctionnalite NOTES_PUBLIPOST -->
+
+ <!-- Fonctionnalite NOTES_EXPORT -->
+ <!-- fonction AC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_EXPORT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AC'),
+ false
+ );
+ <!-- fonction AL -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_EXPORT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AL'),
+ true
+ );
+ <!-- fonction CD -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_EXPORT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CD'),
+ true
+ );
+ <!-- fonction UI -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_EXPORT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'UI'),
+ false
+ );
+ <!-- fonction EDU -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_EXPORT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'EDU'),
+ false
+ );
+ <!-- fonction DOC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_EXPORT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'DOC'),
+ false
+ );
+ <!-- fonction CFC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_EXPORT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CFC'),
+ false
+ );
+ <!-- fonction CTR -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_EXPORT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CTR'),
+ true
+ );
+ <!-- fonction ADF -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_EXPORT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ADF'),
+ false
+ );
+ <!-- fonction ALB -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_EXPORT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ALB'),
+ false
+ );
+ <!-- fonction ASE -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_EXPORT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ASE'),
+ false
+ );
+ <!-- fonction LAB -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_EXPORT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'LAB'),
+ false
+ );
+ <!-- fonction MDS -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_EXPORT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'MDS'),
+ false
+ );
+ <!-- fonction OUV -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_EXPORT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'OUV'),
+ false
+ );
+ <!-- fonction SUR -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_EXPORT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'SUR'),
+ false
+ );
+ <!-- fonction ORI -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_EXPORT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ORI'),
+ false
+ );
+ <!-- fonction AED -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_EXPORT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AED'),
+ false
+ );
+ <!-- fonction AVS -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_EXPORT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AVS'),
+ false
+ );
+ <!-- fonction APP -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_EXPORT'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'APP'),
+ false
+ );
+ <!-- fin Fonctionnalite NOTES_CONSULT -->
+
+ <!-- Fonctionnalite NOTES_SAISIE_SYNTH -->
+ <!-- fonction AC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AC'),
+ false
+ );
+ <!-- fonction AL -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AL'),
+ true
+ );
+ <!-- fonction CD -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CD'),
+ true
+ );
+ <!-- fonction UI -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'UI'),
+ false
+ );
+ <!-- fonction EDU -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'EDU'),
+ true
+ );
+ <!-- fonction DOC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'DOC'),
+ true
+ );
+ <!-- fonction CFC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CFC'),
+ false
+ );
+ <!-- fonction CTR -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CTR'),
+ true
+ );
+ <!-- fonction ADF -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ADF'),
+ false
+ );
+ <!-- fonction ALB -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ALB'),
+ false
+ );
+ <!-- fonction ASE -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ASE'),
+ false
+ );
+ <!-- fonction LAB -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'LAB'),
+ false
+ );
+ <!-- fonction MDS -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'MDS'),
+ false
+ );
+ <!-- fonction OUV -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'OUV'),
+ false
+ );
+ <!-- fonction SUR -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'SUR'),
+ false
+ );
+ <!-- fonction ORI -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ORI'),
+ false
+ );
+ <!-- fonction AED -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AED'),
+ false
+ );
+ <!-- fonction AVS -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AVS'),
+ false
+ );
+ <!-- fonction APP -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'APP'),
+ false
+ );
+ <!-- fin Fonctionnalite NOTES_SAISIE_SYNTH -->
+
+ <!-- Fonctionnalite NOTES_SAISIE_BREVET -->
+
+ <!-- fonction AC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_BREVET'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AC'),
+ false
+ );
+ <!-- fonction AL -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_BREVET'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AL'),
+ true
+ );
+ <!-- fonction CD -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_BREVET'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CD'),
+ true
+ );
+ <!-- fonction UI -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_BREVET'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'UI'),
+ false
+ );
+ <!-- fonction EDU -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_BREVET'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'EDU'),
+ true
+ );
+ <!-- fonction DOC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_BREVET'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'DOC'),
+ true
+ );
+ <!-- fonction CFC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_BREVET'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CFC'),
+ false
+ );
+ <!-- fonction CTR -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_BREVET'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CTR'),
+ true
+ );
+ <!-- fonction ADF -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_BREVET'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ADF'),
+ false
+ );
+ <!-- fonction ALB -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_BREVET'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ALB'),
+ false
+ );
+ <!-- fonction ASE -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_BREVET'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ASE'),
+ false
+ );
+ <!-- fonction LAB -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_BREVET'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'LAB'),
+ false
+ );
+ <!-- fonction MDS -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_BREVET'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'MDS'),
+ false
+ );
+ <!-- fonction OUV -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_BREVET'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'OUV'),
+ false
+ );
+ <!-- fonction SUR -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_BREVET'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'SUR'),
+ false
+ );
+ <!-- fonction ORI -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_BREVET'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ORI'),
+ false
+ );
+ <!-- fonction AED -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_BREVET'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AED'),
+ false
+ );
+ <!-- fonction AVS -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_BREVET'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AVS'),
+ false
+ );
+ <!-- fonction APP -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_BREVET'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'APP'),
+ false
+ );
+ <!-- fin Fonctionnalite NOTES_SAISIE_BREVET -->
+
+ <!-- Fonctionnalite NOTES_CONSULT_NOTES -->
+
+ <!-- fonction AC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AC'),
+ false
+ );
+ <!-- fonction AL -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AL'),
+ true
+ );
+ <!-- fonction CD -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CD'),
+ true
+ );
+ <!-- fonction UI -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'UI'),
+ false
+ );
+ <!-- fonction EDU -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'EDU'),
+ false
+ );
+ <!-- fonction DOC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'DOC'),
+ false
+ );
+ <!-- fonction CFC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CFC'),
+ false
+ );
+ <!-- fonction CTR -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CTR'),
+ true
+ );
+ <!-- fonction ADF -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ADF'),
+ false
+ );
+ <!-- fonction ALB -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ALB'),
+ false
+ );
+ <!-- fonction ASE -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ASE'),
+ false
+ );
+ <!-- fonction LAB -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'LAB'),
+ false
+ );
+ <!-- fonction MDS -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'MDS'),
+ false
+ );
+ <!-- fonction OUV -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'OUV'),
+ false
+ );
+ <!-- fonction SUR -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'SUR'),
+ false
+ );
+ <!-- fonction ORI -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ORI'),
+ false
+ );
+ <!-- fonction AED -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AED'),
+ false
+ );
+ <!-- fonction AVS -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AVS'),
+ false
+ );
+ <!-- fonction APP -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'APP'),
+ false
+ );
+ <!-- fin Fonctionnalite NOTES_CONSULT_NOTES -->
+
+ <!-- Fonctionnalite NOTES_CONSULT_RELEVE_BULLETIN -->
+
+ <!-- fonction AC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_RELEVE_BULLETIN'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AC'),
+ false
+ );
+ <!-- fonction AL -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_RELEVE_BULLETIN'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AL'),
+ true
+ );
+ <!-- fonction CD -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_RELEVE_BULLETIN'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CD'),
+ true
+ );
+ <!-- fonction UI -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_RELEVE_BULLETIN'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'UI'),
+ false
+ );
+ <!-- fonction EDU -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_RELEVE_BULLETIN'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'EDU'),
+ true
+ );
+ <!-- fonction DOC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_RELEVE_BULLETIN'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'DOC'),
+ true
+ );
+ <!-- fonction CFC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_RELEVE_BULLETIN'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CFC'),
+ false
+ );
+ <!-- fonction CTR -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_RELEVE_BULLETIN'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CTR'),
+ true
+ );
+ <!-- fonction ADF -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_RELEVE_BULLETIN'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ADF'),
+ false
+ );
+ <!-- fonction ALB -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_RELEVE_BULLETIN'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ALB'),
+ false
+ );
+ <!-- fonction ASE -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_RELEVE_BULLETIN'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ASE'),
+ false
+ );
+ <!-- fonction LAB -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_RELEVE_BULLETIN'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'LAB'),
+ false
+ );
+ <!-- fonction MDS -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_RELEVE_BULLETIN'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'MDS'),
+ false
+ );
+ <!-- fonction OUV -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_RELEVE_BULLETIN'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'OUV'),
+ false
+ );
+ <!-- fonction SUR -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_RELEVE_BULLETIN'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'SUR'),
+ false
+ );
+ <!-- fonction ORI -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_RELEVE_BULLETIN'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ORI'),
+ false
+ );
+ <!-- fonction AED -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_RELEVE_BULLETIN'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AED'),
+ false
+ );
+ <!-- fonction AVS -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_RELEVE_BULLETIN'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AVS'),
+ false
+ );
+ <!-- fonction APP -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_RELEVE_BULLETIN'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'APP'),
+ false
+ );
+ <!-- fin Fonctionnalite NOTES_CONSULT_RELEVE_BULLETIN -->
+
+ <!-- Fonctionnalite NOTES_CONSULT_APPR -->
+
+ <!-- fonction AC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_APPR'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AC'),
+ false
+ );
+ <!-- fonction AL -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_APPR'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AL'),
+ true
+ );
+ <!-- fonction CD -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_APPR'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CD'),
+ true
+ );
+ <!-- fonction UI -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_APPR'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'UI'),
+ false
+ );
+ <!-- fonction EDU -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_APPR'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'EDU'),
+ true
+ );
+ <!-- fonction DOC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_APPR'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'DOC'),
+ true
+ );
+ <!-- fonction CFC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_APPR'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CFC'),
+ false
+ );
+ <!-- fonction CTR -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_APPR'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CTR'),
+ true
+ );
+ <!-- fonction ADF -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_APPR'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ADF'),
+ false
+ );
+ <!-- fonction ALB -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_APPR'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ALB'),
+ false
+ );
+ <!-- fonction ASE -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_APPR'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ASE'),
+ false
+ );
+ <!-- fonction LAB -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_APPR'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'LAB'),
+ false
+ );
+ <!-- fonction MDS -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_APPR'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'MDS'),
+ false
+ );
+ <!-- fonction OUV -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_APPR'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'OUV'),
+ false
+ );
+ <!-- fonction SUR -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_APPR'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'SUR'),
+ false
+ );
+ <!-- fonction ORI -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_APPR'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ORI'),
+ false
+ );
+ <!-- fonction AED -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_APPR'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AED'),
+ false
+ );
+ <!-- fonction AVS -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_APPR'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AVS'),
+ false
+ );
+ <!-- fonction APP -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_APPR'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'APP'),
+ false
+ );
+ <!-- fin Fonctionnalite NOTES_CONSULT_APPR -->
+
+ <!-- Fonctionnalite NOTES_SAISIE_SYNTH_CONSEIL -->
+
+ <!-- fonction AC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH_CONSEIL'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AC'),
+ false
+ );
+ <!-- fonction AL -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH_CONSEIL'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AL'),
+ true
+ );
+ <!-- fonction CD -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH_CONSEIL'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CD'),
+ true
+ );
+ <!-- fonction UI -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH_CONSEIL'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'UI'),
+ false
+ );
+ <!-- fonction EDU -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH_CONSEIL'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'EDU'),
+ true
+ );
+ <!-- fonction DOC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH_CONSEIL'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'DOC'),
+ true
+ );
+ <!-- fonction CFC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH_CONSEIL'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CFC'),
+ false
+ );
+ <!-- fonction CTR -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH_CONSEIL'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CTR'),
+ true
+ );
+ <!-- fonction ADF -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH_CONSEIL'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ADF'),
+ false
+ );
+ <!-- fonction ALB -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH_CONSEIL'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ALB'),
+ false
+ );
+ <!-- fonction ASE -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH_CONSEIL'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ASE'),
+ false
+ );
+ <!-- fonction LAB -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH_CONSEIL'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'LAB'),
+ false
+ );
+ <!-- fonction MDS -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH_CONSEIL'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'MDS'),
+ false
+ );
+ <!-- fonction OUV -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH_CONSEIL'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'OUV'),
+ false
+ );
+ <!-- fonction SUR -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH_CONSEIL'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'SUR'),
+ false
+ );
+ <!-- fonction ORI -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH_CONSEIL'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ORI'),
+ false
+ );
+ <!-- fonction AED -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH_CONSEIL'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AED'),
+ false
+ );
+ <!-- fonction AVS -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH_CONSEIL'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AVS'),
+ false
+ );
+ <!-- fonction APP -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_SAISIE_SYNTH_CONSEIL'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'APP'),
+ false
+ );
+ <!-- fin Fonctionnalite NOTES_SAISIE_SYNTH_CONSEIL -->
+
+ <!-- Fonctionnalite NOTES_CONSULT_NOTES_MODIF -->
+
+ <!-- fonction AC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES_MODIF'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AC'),
+ false
+ );
+ <!-- fonction AL -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES_MODIF'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AL'),
+ true
+ );
+ <!-- fonction CD -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES_MODIF'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CD'),
+ true
+ );
+ <!-- fonction UI -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES_MODIF'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'UI'),
+ false
+ );
+ <!-- fonction EDU -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES_MODIF'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'EDU'),
+ false
+ );
+ <!-- fonction DOC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES_MODIF'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'DOC'),
+ false
+ );
+ <!-- fonction CFC -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES_MODIF'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CFC'),
+ false
+ );
+ <!-- fonction CTR -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES_MODIF'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'CTR'),
+ true
+ );
+ <!-- fonction ADF -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES_MODIF'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ADF'),
+ false
+ );
+ <!-- fonction ALB -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES_MODIF'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ALB'),
+ false
+ );
+ <!-- fonction ASE -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES_MODIF'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ASE'),
+ false
+ );
+ <!-- fonction LAB -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES_MODIF'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'LAB'),
+ false
+ );
+ <!-- fonction MDS -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES_MODIF'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'MDS'),
+ false
+ );
+ <!-- fonction OUV -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES_MODIF'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'OUV'),
+ false
+ );
+ <!-- fonction SUR -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES_MODIF'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'SUR'),
+ false
+ );
+ <!-- fonction ORI -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES_MODIF'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'ORI'),
+ false
+ );
+ <!-- fonction AED -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES_MODIF'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AED'),
+ false
+ );
+ <!-- fonction AVS -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES_MODIF'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'AVS'),
+ false
+ );
+ <!-- fonction APP -->
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut(id, fonctionnalite_id, fonction_id, actif)
+ VALUES (
+ nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'),
+
+ (SELECT id FROM securite.fonctionnalite WHERE CODE LIKE 'NOTES_CONSULT_NOTES_MODIF'),
+ (SELECT id FROM ent.fonction WHERE CODE LIKE 'APP'),
+ false
+ );
+ <!-- fin Fonctionnalite NOTES_CONSULT_NOTES_MODIF -->
+
+ </sql>
+
+ </changeSet>
+
+
+
+</databaseChangeLog>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ ~ This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ ~
+ ~ Lilie is free software. You can redistribute it and/or modify since
+ ~ you respect the terms of either (at least one of the both license) :
+ ~ - under the terms of the GNU Affero General Public License as
+ ~ published by the Free Software Foundation, either version 3 of the
+ ~ License, or (at your option) any later version.
+ ~ - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ ~ License, or any later version
+ ~
+ ~ There are special exceptions to the terms and conditions of the
+ ~ licenses as they are applied to this software. View the full text of
+ ~ the exception in file LICENSE.txt in the directory of this software
+ ~ distribution.
+ ~
+ ~ Lilie is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ Licenses for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License
+ ~ and the CeCILL-C along with Lilie. If not, see :
+ ~ <http://www.gnu.org/licenses/> and
+ ~ <http://www.cecill.info/licences.fr.html>.
+ -->
+
+<databaseChangeLog
+ xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">
+
+ <changeSet id="1" author="agia">
+
+ <comment>
+ Ajout colonne "actif" dans table "securite.acces_fonctionnalite_fonction"
+ </comment>
+
+ <dropColumn schemaName="securite" tableName="acces_fonctionnalite_fonction"
+ columnName="defaut"/>
+
+ <addColumn schemaName="securite" tableName="acces_fonctionnalite_fonction">
+ <column name="actif" type="boolean">
+ <constraints nullable="false" />
+ </column>
+ </addColumn>
+
+ <comment>
+ Ajout contrainte not null sur "etablissement_id" "securite.acces_fonctionnalite_fonction"
+ </comment>
+
+ <addNotNullConstraint
+ schemaName="securite"
+ tableName="acces_fonctionnalite_fonction"
+ columnName="etablissement_id" />
+
+ <comment>
+ Création table "securite.acces_fonctionnalite_fonction_defaut"
+ </comment>
+
+ <createSequence sequenceName="acces_fonctionnalite_fonction_defaut_id_seq"
+ schemaName="securite"/>
+
+ <createTable tableName="acces_fonctionnalite_fonction_defaut" schemaName="securite">
+
+ <column name="id" type="bigint">
+ <constraints primaryKey="true" primaryKeyName="pk_acces_fonctionnalite_fonction_defaut"
+ nullable="false"/>
+ </column>
+
+ <column name="fonctionnalite_id" type="bigint">
+ <constraints nullable="false"/>
+ </column>
+
+ <column name="fonction_id" type="bigint">
+ <constraints nullable="false"/>
+ </column>
+
+ <column name="actif" type="boolean">
+ <constraints nullable="false"/>
+ </column>
+
+ </createTable>
+
+ <addUniqueConstraint
+ schemaName="securite"
+ tableName="acces_fonctionnalite_fonction_defaut"
+ constraintName="uk_acces_fonctionnalite_fonction_defaut"
+ columnNames="fonctionnalite_id,fonction_id" />
+
+ <addForeignKeyConstraint baseTableName="acces_fonctionnalite_fonction_defaut"
+ baseColumnNames="fonctionnalite_id"
+ baseTableSchemaName="securite"
+ constraintName="fk_acces_fonctionnalite_fonction_defaut_fonctionnalite"
+ referencedTableName="fonctionnalite"
+ referencedColumnNames="id"
+ referencedTableSchemaName="securite" />
+
+ <addForeignKeyConstraint baseTableName="acces_fonctionnalite_fonction_defaut"
+ baseColumnNames="fonction_id"
+ baseTableSchemaName="securite"
+ constraintName="fk_acces_fonctionnalite_fonction_defaut_fonction"
+ referencedTableName="fonction"
+ referencedColumnNames="id"
+ referencedTableSchemaName="ent" />
+
+
+
+ </changeSet>
+
+</databaseChangeLog>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ ~ This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ ~
+ ~ Lilie is free software. You can redistribute it and/or modify since
+ ~ you respect the terms of either (at least one of the both license) :
+ ~ - under the terms of the GNU Affero General Public License as
+ ~ published by the Free Software Foundation, either version 3 of the
+ ~ License, or (at your option) any later version.
+ ~ - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ ~ License, or any later version
+ ~
+ ~ There are special exceptions to the terms and conditions of the
+ ~ licenses as they are applied to this software. View the full text of
+ ~ the exception in file LICENSE.txt in the directory of this software
+ ~ distribution.
+ ~
+ ~ Lilie is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ Licenses for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License
+ ~ and the CeCILL-C along with Lilie. If not, see :
+ ~ <http://www.gnu.org/licenses/> and
+ ~ <http://www.cecill.info/licences.fr.html>.
+ -->
+
+<databaseChangeLog
+ xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">
+
+
+ <changeSet id="1" author="jcok">
+
+ <comment>
+ Alimentation de la table AccesFonctionnaliteFonction
+ </comment>
+
+ <sql>
+
+ <!--APPLICATION SCOLARITE-->
+
+ <!--NIVEAU 0 - APPLICATION-->
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL'), (SELECT id FROM ent.fonction WHERE code = 'AL'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL'), (SELECT id FROM ent.fonction WHERE code = 'CD'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL'), (SELECT id FROM ent.fonction WHERE code = 'EDU'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL'), (SELECT id FROM ent.fonction WHERE code = 'DOC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL'), (SELECT id FROM ent.fonction WHERE code = 'CTR'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL'), (SELECT id FROM ent.fonction WHERE code = 'AC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL'), (SELECT id FROM ent.fonction WHERE code = 'UI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL'), (SELECT id FROM ent.fonction WHERE code = 'CFC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL'), (SELECT id FROM ent.fonction WHERE code = 'ADF'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL'), (SELECT id FROM ent.fonction WHERE code = 'ALB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL'), (SELECT id FROM ent.fonction WHERE code = 'LAB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL'), (SELECT id FROM ent.fonction WHERE code = 'MDS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL'), (SELECT id FROM ent.fonction WHERE code = 'OUV'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL'), (SELECT id FROM ent.fonction WHERE code = 'ASE'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL'), (SELECT id FROM ent.fonction WHERE code = 'ORI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL'), (SELECT id FROM ent.fonction WHERE code = 'AED'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL'), (SELECT id FROM ent.fonction WHERE code = 'APP'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL'), (SELECT id FROM ent.fonction WHERE code = 'AVS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL'), (SELECT id FROM ent.fonction WHERE code = 'SUR'), false);
+
+
+ <!--NIVEAU 1 - MENUS-->
+
+ <!--JOUER IMPORTS A VERIFIER AVEC EDUCATION-->
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_EDT'), (SELECT id FROM ent.fonction WHERE code = 'AL'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_EDT'), (SELECT id FROM ent.fonction WHERE code = 'CD'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_EDT'), (SELECT id FROM ent.fonction WHERE code = 'EDU'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_EDT'), (SELECT id FROM ent.fonction WHERE code = 'DOC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_EDT'), (SELECT id FROM ent.fonction WHERE code = 'CTR'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_EDT'), (SELECT id FROM ent.fonction WHERE code = 'AC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_EDT'), (SELECT id FROM ent.fonction WHERE code = 'UI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_EDT'), (SELECT id FROM ent.fonction WHERE code = 'CFC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_EDT'), (SELECT id FROM ent.fonction WHERE code = 'ADF'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_EDT'), (SELECT id FROM ent.fonction WHERE code = 'ALB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_EDT'), (SELECT id FROM ent.fonction WHERE code = 'LAB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_EDT'), (SELECT id FROM ent.fonction WHERE code = 'MDS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_EDT'), (SELECT id FROM ent.fonction WHERE code = 'OUV'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_EDT'), (SELECT id FROM ent.fonction WHERE code = 'ASE'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_EDT'), (SELECT id FROM ent.fonction WHERE code = 'ORI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_EDT'), (SELECT id FROM ent.fonction WHERE code = 'AED'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_EDT'), (SELECT id FROM ent.fonction WHERE code = 'APP'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_EDT'), (SELECT id FROM ent.fonction WHERE code = 'AVS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_EDT'), (SELECT id FROM ent.fonction WHERE code = 'SUR'), false);
+
+
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'AL'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'CD'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'EDU'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'DOC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'CTR'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'AC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'UI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'CFC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'ADF'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'ALB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'LAB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'MDS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'OUV'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'ASE'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'ORI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'AED'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'APP'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'AVS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'SUR'), false);
+
+ <!--NIVEAU 2 - SOUS-MENUS-->
+
+ <!--SCOL_PARAM_NIV-->
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_NIV'), (SELECT id FROM ent.fonction WHERE code = 'AL'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_NIV'), (SELECT id FROM ent.fonction WHERE code = 'CD'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_NIV'), (SELECT id FROM ent.fonction WHERE code = 'DOC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_NIV'), (SELECT id FROM ent.fonction WHERE code = 'EDU'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_NIV'), (SELECT id FROM ent.fonction WHERE code = 'CTR'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_NIV'), (SELECT id FROM ent.fonction WHERE code = 'AC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_NIV'), (SELECT id FROM ent.fonction WHERE code = 'UI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_NIV'), (SELECT id FROM ent.fonction WHERE code = 'CFC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_NIV'), (SELECT id FROM ent.fonction WHERE code = 'ADF'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_NIV'), (SELECT id FROM ent.fonction WHERE code = 'ALB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_NIV'), (SELECT id FROM ent.fonction WHERE code = 'LAB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_NIV'), (SELECT id FROM ent.fonction WHERE code = 'MDS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_NIV'), (SELECT id FROM ent.fonction WHERE code = 'OUV'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_NIV'), (SELECT id FROM ent.fonction WHERE code = 'ASE'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_NIV'), (SELECT id FROM ent.fonction WHERE code = 'ORI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_NIV'), (SELECT id FROM ent.fonction WHERE code = 'AED'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_NIV'), (SELECT id FROM ent.fonction WHERE code = 'APP'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_NIV'), (SELECT id FROM ent.fonction WHERE code = 'AVS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_NIV'), (SELECT id FROM ent.fonction WHERE code = 'SUR'), false);
+
+ <!--SCOL_PARAM_MATIERES-->
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MATIERES'), (SELECT id FROM ent.fonction WHERE code = 'AL'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MATIERES'), (SELECT id FROM ent.fonction WHERE code = 'CD'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MATIERES'), (SELECT id FROM ent.fonction WHERE code = 'DOC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MATIERES'), (SELECT id FROM ent.fonction WHERE code = 'EDU'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MATIERES'), (SELECT id FROM ent.fonction WHERE code = 'CTR'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MATIERES'), (SELECT id FROM ent.fonction WHERE code = 'AC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MATIERES'), (SELECT id FROM ent.fonction WHERE code = 'UI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MATIERES'), (SELECT id FROM ent.fonction WHERE code = 'CFC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MATIERES'), (SELECT id FROM ent.fonction WHERE code = 'ADF'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MATIERES'), (SELECT id FROM ent.fonction WHERE code = 'ALB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MATIERES'), (SELECT id FROM ent.fonction WHERE code = 'LAB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MATIERES'), (SELECT id FROM ent.fonction WHERE code = 'MDS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MATIERES'), (SELECT id FROM ent.fonction WHERE code = 'OUV'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MATIERES'), (SELECT id FROM ent.fonction WHERE code = 'ASE'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MATIERES'), (SELECT id FROM ent.fonction WHERE code = 'ORI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MATIERES'), (SELECT id FROM ent.fonction WHERE code = 'AED'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MATIERES'), (SELECT id FROM ent.fonction WHERE code = 'APP'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MATIERES'), (SELECT id FROM ent.fonction WHERE code = 'AVS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MATIERES'), (SELECT id FROM ent.fonction WHERE code = 'SUR'), false);
+
+ <!--SCOL_PARAM_TYP_ACT_DEV-->
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_TYP_ACT_DEV'), (SELECT id FROM ent.fonction WHERE code = 'AL'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_TYP_ACT_DEV'), (SELECT id FROM ent.fonction WHERE code = 'CD'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_TYP_ACT_DEV'), (SELECT id FROM ent.fonction WHERE code = 'DOC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_TYP_ACT_DEV'), (SELECT id FROM ent.fonction WHERE code = 'EDU'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_TYP_ACT_DEV'), (SELECT id FROM ent.fonction WHERE code = 'CTR'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_TYP_ACT_DEV'), (SELECT id FROM ent.fonction WHERE code = 'AC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_TYP_ACT_DEV'), (SELECT id FROM ent.fonction WHERE code = 'UI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_TYP_ACT_DEV'), (SELECT id FROM ent.fonction WHERE code = 'CFC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_TYP_ACT_DEV'), (SELECT id FROM ent.fonction WHERE code = 'ADF'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_TYP_ACT_DEV'), (SELECT id FROM ent.fonction WHERE code = 'ALB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_TYP_ACT_DEV'), (SELECT id FROM ent.fonction WHERE code = 'LAB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_TYP_ACT_DEV'), (SELECT id FROM ent.fonction WHERE code = 'MDS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_TYP_ACT_DEV'), (SELECT id FROM ent.fonction WHERE code = 'OUV'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_TYP_ACT_DEV'), (SELECT id FROM ent.fonction WHERE code = 'ASE'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_TYP_ACT_DEV'), (SELECT id FROM ent.fonction WHERE code = 'ORI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_TYP_ACT_DEV'), (SELECT id FROM ent.fonction WHERE code = 'AED'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_TYP_ACT_DEV'), (SELECT id FROM ent.fonction WHERE code = 'APP'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_TYP_ACT_DEV'), (SELECT id FROM ent.fonction WHERE code = 'AVS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_TYP_ACT_DEV'), (SELECT id FROM ent.fonction WHERE code = 'SUR'), false);
+
+ <!--SCOL_PARAM_CAL_HEBDO_ANNU-->
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_CAL_HEBDO_ANNU'), (SELECT id FROM ent.fonction WHERE code = 'AL'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_CAL_HEBDO_ANNU'), (SELECT id FROM ent.fonction WHERE code = 'CD'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_CAL_HEBDO_ANNU'), (SELECT id FROM ent.fonction WHERE code = 'EDU'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_CAL_HEBDO_ANNU'), (SELECT id FROM ent.fonction WHERE code = 'DOC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_CAL_HEBDO_ANNU'), (SELECT id FROM ent.fonction WHERE code = 'CTR'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_CAL_HEBDO_ANNU'), (SELECT id FROM ent.fonction WHERE code = 'AC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_CAL_HEBDO_ANNU'), (SELECT id FROM ent.fonction WHERE code = 'UI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_CAL_HEBDO_ANNU'), (SELECT id FROM ent.fonction WHERE code = 'CFC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_CAL_HEBDO_ANNU'), (SELECT id FROM ent.fonction WHERE code = 'ADF'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_CAL_HEBDO_ANNU'), (SELECT id FROM ent.fonction WHERE code = 'ALB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_CAL_HEBDO_ANNU'), (SELECT id FROM ent.fonction WHERE code = 'LAB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_CAL_HEBDO_ANNU'), (SELECT id FROM ent.fonction WHERE code = 'MDS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_CAL_HEBDO_ANNU'), (SELECT id FROM ent.fonction WHERE code = 'OUV'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_CAL_HEBDO_ANNU'), (SELECT id FROM ent.fonction WHERE code = 'ASE'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_CAL_HEBDO_ANNU'), (SELECT id FROM ent.fonction WHERE code = 'ORI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_CAL_HEBDO_ANNU'), (SELECT id FROM ent.fonction WHERE code = 'AED'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_CAL_HEBDO_ANNU'), (SELECT id FROM ent.fonction WHERE code = 'APP'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_CAL_HEBDO_ANNU'), (SELECT id FROM ent.fonction WHERE code = 'AVS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_CAL_HEBDO_ANNU'), (SELECT id FROM ent.fonction WHERE code = 'SUR'), false);
+
+ <!--SCOL_PARAM_MODELES_DOC-->
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MODELES_DOC'), (SELECT id FROM ent.fonction WHERE code = 'AL'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MODELES_DOC'), (SELECT id FROM ent.fonction WHERE code = 'CD'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MODELES_DOC'), (SELECT id FROM ent.fonction WHERE code = 'EDU'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MODELES_DOC'), (SELECT id FROM ent.fonction WHERE code = 'DOC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MODELES_DOC'), (SELECT id FROM ent.fonction WHERE code = 'CTR'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MODELES_DOC'), (SELECT id FROM ent.fonction WHERE code = 'AC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MODELES_DOC'), (SELECT id FROM ent.fonction WHERE code = 'UI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MODELES_DOC'), (SELECT id FROM ent.fonction WHERE code = 'CFC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MODELES_DOC'), (SELECT id FROM ent.fonction WHERE code = 'ADF'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MODELES_DOC'), (SELECT id FROM ent.fonction WHERE code = 'ALB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MODELES_DOC'), (SELECT id FROM ent.fonction WHERE code = 'LAB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MODELES_DOC'), (SELECT id FROM ent.fonction WHERE code = 'MDS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MODELES_DOC'), (SELECT id FROM ent.fonction WHERE code = 'OUV'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MODELES_DOC'), (SELECT id FROM ent.fonction WHERE code = 'ASE'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MODELES_DOC'), (SELECT id FROM ent.fonction WHERE code = 'ORI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MODELES_DOC'), (SELECT id FROM ent.fonction WHERE code = 'AED'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MODELES_DOC'), (SELECT id FROM ent.fonction WHERE code = 'APP'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MODELES_DOC'), (SELECT id FROM ent.fonction WHERE code = 'AVS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'SCOL_PARAM_MODELES_DOC'), (SELECT id FROM ent.fonction WHERE code = 'SUR'), false);
+
+
+ <!-- FIN APPLICATION SCOLARITE-->
+
+ <!--NIVEAU 0 - APPLICATION-->
+
+ <!--APPLICATION ABSENCES-->
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS'), (SELECT id FROM ent.fonction WHERE code = 'AL'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS'), (SELECT id FROM ent.fonction WHERE code = 'CD'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS'), (SELECT id FROM ent.fonction WHERE code = 'DOC'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS'), (SELECT id FROM ent.fonction WHERE code = 'EDU'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS'), (SELECT id FROM ent.fonction WHERE code = 'CTR'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS'), (SELECT id FROM ent.fonction WHERE code = 'AC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS'), (SELECT id FROM ent.fonction WHERE code = 'UI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS'), (SELECT id FROM ent.fonction WHERE code = 'CFC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS'), (SELECT id FROM ent.fonction WHERE code = 'ADF'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS'), (SELECT id FROM ent.fonction WHERE code = 'ALB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS'), (SELECT id FROM ent.fonction WHERE code = 'LAB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS'), (SELECT id FROM ent.fonction WHERE code = 'MDS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS'), (SELECT id FROM ent.fonction WHERE code = 'OUV'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS'), (SELECT id FROM ent.fonction WHERE code = 'ASE'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS'), (SELECT id FROM ent.fonction WHERE code = 'ORI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS'), (SELECT id FROM ent.fonction WHERE code = 'AED'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS'), (SELECT id FROM ent.fonction WHERE code = 'APP'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS'), (SELECT id FROM ent.fonction WHERE code = 'AVS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS'), (SELECT id FROM ent.fonction WHERE code = 'SUR'), false);
+
+ <!--NIVEAU 1 - MENUS-->
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE'), (SELECT id FROM ent.fonction WHERE code = 'AL'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE'), (SELECT id FROM ent.fonction WHERE code = 'CD'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE'), (SELECT id FROM ent.fonction WHERE code = 'DOC'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE'), (SELECT id FROM ent.fonction WHERE code = 'EDU'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE'), (SELECT id FROM ent.fonction WHERE code = 'CTR'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE'), (SELECT id FROM ent.fonction WHERE code = 'AC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE'), (SELECT id FROM ent.fonction WHERE code = 'UI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE'), (SELECT id FROM ent.fonction WHERE code = 'CFC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE'), (SELECT id FROM ent.fonction WHERE code = 'ADF'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE'), (SELECT id FROM ent.fonction WHERE code = 'ALB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE'), (SELECT id FROM ent.fonction WHERE code = 'LAB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE'), (SELECT id FROM ent.fonction WHERE code = 'MDS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE'), (SELECT id FROM ent.fonction WHERE code = 'OUV'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE'), (SELECT id FROM ent.fonction WHERE code = 'ASE'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE'), (SELECT id FROM ent.fonction WHERE code = 'ORI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE'), (SELECT id FROM ent.fonction WHERE code = 'AED'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE'), (SELECT id FROM ent.fonction WHERE code = 'APP'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE'), (SELECT id FROM ent.fonction WHERE code = 'AVS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE'), (SELECT id FROM ent.fonction WHERE code = 'SUR'), false);
+
+
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'AL'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'CD'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'DOC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'EDU'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'CTR'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'AC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'UI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'CFC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'ADF'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'ALB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'LAB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'MDS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'OUV'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'ASE'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'ORI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'AED'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'APP'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'AVS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM'), (SELECT id FROM ent.fonction WHERE code = 'SUR'), false);
+
+
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_CONSULT'), (SELECT id FROM ent.fonction WHERE code = 'AL'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_CONSULT'), (SELECT id FROM ent.fonction WHERE code = 'CD'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_CONSULT'), (SELECT id FROM ent.fonction WHERE code = 'DOC'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_CONSULT'), (SELECT id FROM ent.fonction WHERE code = 'EDU'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_CONSULT'), (SELECT id FROM ent.fonction WHERE code = 'CTR'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_CONSULT'), (SELECT id FROM ent.fonction WHERE code = 'AC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_CONSULT'), (SELECT id FROM ent.fonction WHERE code = 'UI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_CONSULT'), (SELECT id FROM ent.fonction WHERE code = 'CFC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_CONSULT'), (SELECT id FROM ent.fonction WHERE code = 'ADF'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_CONSULT'), (SELECT id FROM ent.fonction WHERE code = 'ALB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_CONSULT'), (SELECT id FROM ent.fonction WHERE code = 'LAB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_CONSULT'), (SELECT id FROM ent.fonction WHERE code = 'MDS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_CONSULT'), (SELECT id FROM ent.fonction WHERE code = 'OUV'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_CONSULT'), (SELECT id FROM ent.fonction WHERE code = 'ASE'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_CONSULT'), (SELECT id FROM ent.fonction WHERE code = 'ORI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_CONSULT'), (SELECT id FROM ent.fonction WHERE code = 'AED'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_CONSULT'), (SELECT id FROM ent.fonction WHERE code = 'APP'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_CONSULT'), (SELECT id FROM ent.fonction WHERE code = 'AVS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_CONSULT'), (SELECT id FROM ent.fonction WHERE code = 'SUR'), false);
+
+
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_STATS'), (SELECT id FROM ent.fonction WHERE code = 'AL'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_STATS'), (SELECT id FROM ent.fonction WHERE code = 'CD'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_STATS'), (SELECT id FROM ent.fonction WHERE code = 'EDU'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_STATS'), (SELECT id FROM ent.fonction WHERE code = 'CTR'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_STATS'), (SELECT id FROM ent.fonction WHERE code = 'DOC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_STATS'), (SELECT id FROM ent.fonction WHERE code = 'AC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_STATS'), (SELECT id FROM ent.fonction WHERE code = 'UI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_STATS'), (SELECT id FROM ent.fonction WHERE code = 'CFC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_STATS'), (SELECT id FROM ent.fonction WHERE code = 'ADF'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_STATS'), (SELECT id FROM ent.fonction WHERE code = 'ALB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_STATS'), (SELECT id FROM ent.fonction WHERE code = 'LAB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_STATS'), (SELECT id FROM ent.fonction WHERE code = 'MDS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_STATS'), (SELECT id FROM ent.fonction WHERE code = 'OUV'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_STATS'), (SELECT id FROM ent.fonction WHERE code = 'ASE'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_STATS'), (SELECT id FROM ent.fonction WHERE code = 'ORI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_STATS'), (SELECT id FROM ent.fonction WHERE code = 'AED'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_STATS'), (SELECT id FROM ent.fonction WHERE code = 'APP'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_STATS'), (SELECT id FROM ent.fonction WHERE code = 'AVS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_STATS'), (SELECT id FROM ent.fonction WHERE code = 'SUR'), false);
+
+
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PUBLIPOSTAGE'), (SELECT id FROM ent.fonction WHERE code = 'AL'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PUBLIPOSTAGE'), (SELECT id FROM ent.fonction WHERE code = 'CD'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PUBLIPOSTAGE'), (SELECT id FROM ent.fonction WHERE code = 'EDU'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PUBLIPOSTAGE'), (SELECT id FROM ent.fonction WHERE code = 'CTR'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PUBLIPOSTAGE'), (SELECT id FROM ent.fonction WHERE code = 'DOC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PUBLIPOSTAGE'), (SELECT id FROM ent.fonction WHERE code = 'AC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PUBLIPOSTAGE'), (SELECT id FROM ent.fonction WHERE code = 'UI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PUBLIPOSTAGE'), (SELECT id FROM ent.fonction WHERE code = 'CFC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PUBLIPOSTAGE'), (SELECT id FROM ent.fonction WHERE code = 'ADF'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PUBLIPOSTAGE'), (SELECT id FROM ent.fonction WHERE code = 'ALB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PUBLIPOSTAGE'), (SELECT id FROM ent.fonction WHERE code = 'LAB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PUBLIPOSTAGE'), (SELECT id FROM ent.fonction WHERE code = 'MDS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PUBLIPOSTAGE'), (SELECT id FROM ent.fonction WHERE code = 'OUV'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PUBLIPOSTAGE'), (SELECT id FROM ent.fonction WHERE code = 'ASE'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PUBLIPOSTAGE'), (SELECT id FROM ent.fonction WHERE code = 'ORI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PUBLIPOSTAGE'), (SELECT id FROM ent.fonction WHERE code = 'AED'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PUBLIPOSTAGE'), (SELECT id FROM ent.fonction WHERE code = 'APP'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PUBLIPOSTAGE'), (SELECT id FROM ent.fonction WHERE code = 'AVS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PUBLIPOSTAGE'), (SELECT id FROM ent.fonction WHERE code = 'SUR'), false);
+
+
+ <!--NIVEAU 2 - SOUS-MENUS-->
+
+ <!--ABS_SAISIE_APPELS-->
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_APPELS'), (SELECT id FROM ent.fonction WHERE code = 'AL'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_APPELS'), (SELECT id FROM ent.fonction WHERE code = 'CD'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_APPELS'), (SELECT id FROM ent.fonction WHERE code = 'DOC'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_APPELS'), (SELECT id FROM ent.fonction WHERE code = 'EDU'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_APPELS'), (SELECT id FROM ent.fonction WHERE code = 'CTR'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_APPELS'), (SELECT id FROM ent.fonction WHERE code = 'AC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_APPELS'), (SELECT id FROM ent.fonction WHERE code = 'UI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_APPELS'), (SELECT id FROM ent.fonction WHERE code = 'CFC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_APPELS'), (SELECT id FROM ent.fonction WHERE code = 'ADF'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_APPELS'), (SELECT id FROM ent.fonction WHERE code = 'ALB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_APPELS'), (SELECT id FROM ent.fonction WHERE code = 'LAB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_APPELS'), (SELECT id FROM ent.fonction WHERE code = 'MDS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_APPELS'), (SELECT id FROM ent.fonction WHERE code = 'OUV'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_APPELS'), (SELECT id FROM ent.fonction WHERE code = 'ASE'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_APPELS'), (SELECT id FROM ent.fonction WHERE code = 'ORI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_APPELS'), (SELECT id FROM ent.fonction WHERE code = 'AED'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_APPELS'), (SELECT id FROM ent.fonction WHERE code = 'APP'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_APPELS'), (SELECT id FROM ent.fonction WHERE code = 'AVS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_APPELS'), (SELECT id FROM ent.fonction WHERE code = 'SUR'), false);
+
+ <!--ABS_SAISIE_ABS_RETARDS_DEPARTS-->
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_ABS_RETARDS_DEPARTS'), (SELECT id FROM ent.fonction WHERE code = 'AL'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_ABS_RETARDS_DEPARTS'), (SELECT id FROM ent.fonction WHERE code = 'CD'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_ABS_RETARDS_DEPARTS'), (SELECT id FROM ent.fonction WHERE code = 'EDU'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_ABS_RETARDS_DEPARTS'), (SELECT id FROM ent.fonction WHERE code = 'CTR'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_ABS_RETARDS_DEPARTS'), (SELECT id FROM ent.fonction WHERE code = 'DOC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_ABS_RETARDS_DEPARTS'), (SELECT id FROM ent.fonction WHERE code = 'AC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_ABS_RETARDS_DEPARTS'), (SELECT id FROM ent.fonction WHERE code = 'UI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_ABS_RETARDS_DEPARTS'), (SELECT id FROM ent.fonction WHERE code = 'CFC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_ABS_RETARDS_DEPARTS'), (SELECT id FROM ent.fonction WHERE code = 'ADF'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_ABS_RETARDS_DEPARTS'), (SELECT id FROM ent.fonction WHERE code = 'ALB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_ABS_RETARDS_DEPARTS'), (SELECT id FROM ent.fonction WHERE code = 'LAB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_ABS_RETARDS_DEPARTS'), (SELECT id FROM ent.fonction WHERE code = 'MDS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_ABS_RETARDS_DEPARTS'), (SELECT id FROM ent.fonction WHERE code = 'OUV'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_ABS_RETARDS_DEPARTS'), (SELECT id FROM ent.fonction WHERE code = 'ASE'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_ABS_RETARDS_DEPARTS'), (SELECT id FROM ent.fonction WHERE code = 'ORI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_ABS_RETARDS_DEPARTS'), (SELECT id FROM ent.fonction WHERE code = 'AED'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_ABS_RETARDS_DEPARTS'), (SELECT id FROM ent.fonction WHERE code = 'APP'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_ABS_RETARDS_DEPARTS'), (SELECT id FROM ent.fonction WHERE code = 'AVS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_ABS_RETARDS_DEPARTS'), (SELECT id FROM ent.fonction WHERE code = 'SUR'), false);
+
+ <!--ABS_SAISIE_DEMI_PENSION_INTERNAT-->
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_DEMI_PENSION_INTERNAT'), (SELECT id FROM ent.fonction WHERE code = 'AL'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_DEMI_PENSION_INTERNAT'), (SELECT id FROM ent.fonction WHERE code = 'CD'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_DEMI_PENSION_INTERNAT'), (SELECT id FROM ent.fonction WHERE code = 'EDU'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_DEMI_PENSION_INTERNAT'), (SELECT id FROM ent.fonction WHERE code = 'CTR'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_DEMI_PENSION_INTERNAT'), (SELECT id FROM ent.fonction WHERE code = 'DOC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_DEMI_PENSION_INTERNAT'), (SELECT id FROM ent.fonction WHERE code = 'AC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_DEMI_PENSION_INTERNAT'), (SELECT id FROM ent.fonction WHERE code = 'UI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_DEMI_PENSION_INTERNAT'), (SELECT id FROM ent.fonction WHERE code = 'CFC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_DEMI_PENSION_INTERNAT'), (SELECT id FROM ent.fonction WHERE code = 'ADF'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_DEMI_PENSION_INTERNAT'), (SELECT id FROM ent.fonction WHERE code = 'ALB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_DEMI_PENSION_INTERNAT'), (SELECT id FROM ent.fonction WHERE code = 'LAB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_DEMI_PENSION_INTERNAT'), (SELECT id FROM ent.fonction WHERE code = 'MDS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_DEMI_PENSION_INTERNAT'), (SELECT id FROM ent.fonction WHERE code = 'OUV'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_DEMI_PENSION_INTERNAT'), (SELECT id FROM ent.fonction WHERE code = 'ASE'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_DEMI_PENSION_INTERNAT'), (SELECT id FROM ent.fonction WHERE code = 'ORI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_DEMI_PENSION_INTERNAT'), (SELECT id FROM ent.fonction WHERE code = 'AED'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_DEMI_PENSION_INTERNAT'), (SELECT id FROM ent.fonction WHERE code = 'APP'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_DEMI_PENSION_INTERNAT'), (SELECT id FROM ent.fonction WHERE code = 'AVS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_DEMI_PENSION_INTERNAT'), (SELECT id FROM ent.fonction WHERE code = 'SUR'), false);
+
+ <!--ABS_SAISIE_INC_PUN_SAN-->
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'AL'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'CD'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'EDU'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'CTR'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'DOC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'AC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'UI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'CFC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'ADF'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'ALB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'LAB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'MDS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'OUV'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'ASE'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'ORI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'AED'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'APP'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'AVS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_SAISIE_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'SUR'), false);
+
+ <!--ABS_PARAM_GENERAUX-->
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_GENERAUX'), (SELECT id FROM ent.fonction WHERE code = 'AL'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_GENERAUX'), (SELECT id FROM ent.fonction WHERE code = 'CD'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_GENERAUX'), (SELECT id FROM ent.fonction WHERE code = 'CTR'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_GENERAUX'), (SELECT id FROM ent.fonction WHERE code = 'DOC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_GENERAUX'), (SELECT id FROM ent.fonction WHERE code = 'EDU'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_GENERAUX'), (SELECT id FROM ent.fonction WHERE code = 'AC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_GENERAUX'), (SELECT id FROM ent.fonction WHERE code = 'UI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_GENERAUX'), (SELECT id FROM ent.fonction WHERE code = 'CFC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_GENERAUX'), (SELECT id FROM ent.fonction WHERE code = 'ADF'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_GENERAUX'), (SELECT id FROM ent.fonction WHERE code = 'ALB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_GENERAUX'), (SELECT id FROM ent.fonction WHERE code = 'LAB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_GENERAUX'), (SELECT id FROM ent.fonction WHERE code = 'MDS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_GENERAUX'), (SELECT id FROM ent.fonction WHERE code = 'OUV'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_GENERAUX'), (SELECT id FROM ent.fonction WHERE code = 'ASE'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_GENERAUX'), (SELECT id FROM ent.fonction WHERE code = 'ORI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_GENERAUX'), (SELECT id FROM ent.fonction WHERE code = 'AED'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_GENERAUX'), (SELECT id FROM ent.fonction WHERE code = 'APP'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_GENERAUX'), (SELECT id FROM ent.fonction WHERE code = 'AVS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_GENERAUX'), (SELECT id FROM ent.fonction WHERE code = 'SUR'), false);
+
+ <!--ABS_PARAM_MOTIFS-->
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_MOTIFS'), (SELECT id FROM ent.fonction WHERE code = 'AL'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_MOTIFS'), (SELECT id FROM ent.fonction WHERE code = 'CD'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_MOTIFS'), (SELECT id FROM ent.fonction WHERE code = 'EDU'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_MOTIFS'), (SELECT id FROM ent.fonction WHERE code = 'CTR'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_MOTIFS'), (SELECT id FROM ent.fonction WHERE code = 'DOC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_MOTIFS'), (SELECT id FROM ent.fonction WHERE code = 'AC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_MOTIFS'), (SELECT id FROM ent.fonction WHERE code = 'UI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_MOTIFS'), (SELECT id FROM ent.fonction WHERE code = 'CFC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_MOTIFS'), (SELECT id FROM ent.fonction WHERE code = 'ADF'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_MOTIFS'), (SELECT id FROM ent.fonction WHERE code = 'ALB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_MOTIFS'), (SELECT id FROM ent.fonction WHERE code = 'LAB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_MOTIFS'), (SELECT id FROM ent.fonction WHERE code = 'MDS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_MOTIFS'), (SELECT id FROM ent.fonction WHERE code = 'OUV'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_MOTIFS'), (SELECT id FROM ent.fonction WHERE code = 'ASE'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_MOTIFS'), (SELECT id FROM ent.fonction WHERE code = 'ORI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_MOTIFS'), (SELECT id FROM ent.fonction WHERE code = 'AED'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_MOTIFS'), (SELECT id FROM ent.fonction WHERE code = 'APP'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_MOTIFS'), (SELECT id FROM ent.fonction WHERE code = 'AVS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_MOTIFS'), (SELECT id FROM ent.fonction WHERE code = 'SUR'), false);
+
+ <!--ABS_PARAM_INC_PUN_SAN-->
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'AL'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'CD'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'EDU'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'CTR'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'DOC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'AC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'UI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'CFC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'ADF'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'ALB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'LAB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'MDS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'OUV'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'ASE'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'ORI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'AED'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'APP'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'AVS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'ABS_PARAM_INC_PUN_SAN'), (SELECT id FROM ent.fonction WHERE code = 'SUR'), false);
+
+
+ <!-- FIN APPLICATION ABSENCES-->
+
+ <!--FICHE ELEVE-->
+
+ <!--FICHE_ELEVE_COMMENTAIRE -->
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_COMMENTAIRE'), (SELECT id FROM ent.fonction WHERE code = 'CD'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_COMMENTAIRE'), (SELECT id FROM ent.fonction WHERE code = 'EDU'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_COMMENTAIRE'), (SELECT id FROM ent.fonction WHERE code = 'CTR'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_COMMENTAIRE'), (SELECT id FROM ent.fonction WHERE code = 'AL'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_COMMENTAIRE'), (SELECT id FROM ent.fonction WHERE code = 'DOC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_COMMENTAIRE'), (SELECT id FROM ent.fonction WHERE code = 'AC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_COMMENTAIRE'), (SELECT id FROM ent.fonction WHERE code = 'UI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_COMMENTAIRE'), (SELECT id FROM ent.fonction WHERE code = 'CFC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_COMMENTAIRE'), (SELECT id FROM ent.fonction WHERE code = 'ADF'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_COMMENTAIRE'), (SELECT id FROM ent.fonction WHERE code = 'ALB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_COMMENTAIRE'), (SELECT id FROM ent.fonction WHERE code = 'LAB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_COMMENTAIRE'), (SELECT id FROM ent.fonction WHERE code = 'MDS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_COMMENTAIRE'), (SELECT id FROM ent.fonction WHERE code = 'OUV'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_COMMENTAIRE'), (SELECT id FROM ent.fonction WHERE code = 'ASE'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_COMMENTAIRE'), (SELECT id FROM ent.fonction WHERE code = 'ORI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_COMMENTAIRE'), (SELECT id FROM ent.fonction WHERE code = 'AED'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_COMMENTAIRE'), (SELECT id FROM ent.fonction WHERE code = 'APP'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_COMMENTAIRE'), (SELECT id FROM ent.fonction WHERE code = 'AVS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_COMMENTAIRE'), (SELECT id FROM ent.fonction WHERE code = 'SUR'), false);
+
+ <!--FICHE_ELEVE_ABSENCES-->
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_ABSENCES'), (SELECT id FROM ent.fonction WHERE code = 'AL'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_ABSENCES'), (SELECT id FROM ent.fonction WHERE code = 'CD'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_ABSENCES'), (SELECT id FROM ent.fonction WHERE code = 'DOC'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_ABSENCES'), (SELECT id FROM ent.fonction WHERE code = 'EDU'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_ABSENCES'), (SELECT id FROM ent.fonction WHERE code = 'CTR'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_ABSENCES'), (SELECT id FROM ent.fonction WHERE code = 'AC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_ABSENCES'), (SELECT id FROM ent.fonction WHERE code = 'UI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_ABSENCES'), (SELECT id FROM ent.fonction WHERE code = 'CFC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_ABSENCES'), (SELECT id FROM ent.fonction WHERE code = 'ADF'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_ABSENCES'), (SELECT id FROM ent.fonction WHERE code = 'ALB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_ABSENCES'), (SELECT id FROM ent.fonction WHERE code = 'LAB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_ABSENCES'), (SELECT id FROM ent.fonction WHERE code = 'MDS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_ABSENCES'), (SELECT id FROM ent.fonction WHERE code = 'OUV'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_ABSENCES'), (SELECT id FROM ent.fonction WHERE code = 'ASE'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_ABSENCES'), (SELECT id FROM ent.fonction WHERE code = 'ORI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_ABSENCES'), (SELECT id FROM ent.fonction WHERE code = 'AED'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_ABSENCES'), (SELECT id FROM ent.fonction WHERE code = 'APP'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_ABSENCES'), (SELECT id FROM ent.fonction WHERE code = 'AVS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_ABSENCES'), (SELECT id FROM ent.fonction WHERE code = 'SUR'), false);
+
+ <!--FICHE_ELEVE_SANCTIONS-->
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_SANCTIONS'), (SELECT id FROM ent.fonction WHERE code = 'AL'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_SANCTIONS'), (SELECT id FROM ent.fonction WHERE code = 'CD'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_SANCTIONS'), (SELECT id FROM ent.fonction WHERE code = 'DOC'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_SANCTIONS'), (SELECT id FROM ent.fonction WHERE code = 'EDU'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_SANCTIONS'), (SELECT id FROM ent.fonction WHERE code = 'CTR'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_SANCTIONS'), (SELECT id FROM ent.fonction WHERE code = 'AC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_SANCTIONS'), (SELECT id FROM ent.fonction WHERE code = 'UI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_SANCTIONS'), (SELECT id FROM ent.fonction WHERE code = 'CFC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_SANCTIONS'), (SELECT id FROM ent.fonction WHERE code = 'ADF'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_SANCTIONS'), (SELECT id FROM ent.fonction WHERE code = 'ALB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_SANCTIONS'), (SELECT id FROM ent.fonction WHERE code = 'LAB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_SANCTIONS'), (SELECT id FROM ent.fonction WHERE code = 'MDS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_SANCTIONS'), (SELECT id FROM ent.fonction WHERE code = 'OUV'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_SANCTIONS'), (SELECT id FROM ent.fonction WHERE code = 'ASE'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_SANCTIONS'), (SELECT id FROM ent.fonction WHERE code = 'ORI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_SANCTIONS'), (SELECT id FROM ent.fonction WHERE code = 'AED'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_SANCTIONS'), (SELECT id FROM ent.fonction WHERE code = 'APP'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_SANCTIONS'), (SELECT id FROM ent.fonction WHERE code = 'AVS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_SANCTIONS'), (SELECT id FROM ent.fonction WHERE code = 'SUR'), false);
+
+ <!--FICHE_ELEVE_NOTES-->
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_NOTES'), (SELECT id FROM ent.fonction WHERE code = 'AL'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_NOTES'), (SELECT id FROM ent.fonction WHERE code = 'CD'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_NOTES'), (SELECT id FROM ent.fonction WHERE code = 'DOC'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_NOTES'), (SELECT id FROM ent.fonction WHERE code = 'EDU'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_NOTES'), (SELECT id FROM ent.fonction WHERE code = 'CTR'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_NOTES'), (SELECT id FROM ent.fonction WHERE code = 'AC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_NOTES'), (SELECT id FROM ent.fonction WHERE code = 'UI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_NOTES'), (SELECT id FROM ent.fonction WHERE code = 'CFC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_NOTES'), (SELECT id FROM ent.fonction WHERE code = 'ADF'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_NOTES'), (SELECT id FROM ent.fonction WHERE code = 'ALB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_NOTES'), (SELECT id FROM ent.fonction WHERE code = 'LAB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_NOTES'), (SELECT id FROM ent.fonction WHERE code = 'MDS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_NOTES'), (SELECT id FROM ent.fonction WHERE code = 'OUV'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_NOTES'), (SELECT id FROM ent.fonction WHERE code = 'ASE'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_NOTES'), (SELECT id FROM ent.fonction WHERE code = 'ORI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_NOTES'), (SELECT id FROM ent.fonction WHERE code = 'AED'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_NOTES'), (SELECT id FROM ent.fonction WHERE code = 'APP'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_NOTES'), (SELECT id FROM ent.fonction WHERE code = 'AVS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_NOTES'), (SELECT id FROM ent.fonction WHERE code = 'SUR'), false);
+
+ <!--FICHE_ELEVE_CONSEIL-->
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_CONSEIL'), (SELECT id FROM ent.fonction WHERE code = 'AL'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_CONSEIL'), (SELECT id FROM ent.fonction WHERE code = 'CD'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_CONSEIL'), (SELECT id FROM ent.fonction WHERE code = 'DOC'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_CONSEIL'), (SELECT id FROM ent.fonction WHERE code = 'EDU'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_CONSEIL'), (SELECT id FROM ent.fonction WHERE code = 'CTR'), true);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_CONSEIL'), (SELECT id FROM ent.fonction WHERE code = 'AC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_CONSEIL'), (SELECT id FROM ent.fonction WHERE code = 'UI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_CONSEIL'), (SELECT id FROM ent.fonction WHERE code = 'CFC'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_CONSEIL'), (SELECT id FROM ent.fonction WHERE code = 'ADF'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_CONSEIL'), (SELECT id FROM ent.fonction WHERE code = 'ALB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_CONSEIL'), (SELECT id FROM ent.fonction WHERE code = 'LAB'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_CONSEIL'), (SELECT id FROM ent.fonction WHERE code = 'MDS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_CONSEIL'), (SELECT id FROM ent.fonction WHERE code = 'OUV'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_CONSEIL'), (SELECT id FROM ent.fonction WHERE code = 'ASE'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_CONSEIL'), (SELECT id FROM ent.fonction WHERE code = 'ORI'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_CONSEIL'), (SELECT id FROM ent.fonction WHERE code = 'AED'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_CONSEIL'), (SELECT id FROM ent.fonction WHERE code = 'APP'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_CONSEIL'), (SELECT id FROM ent.fonction WHERE code = 'AVS'), false);
+
+ INSERT INTO securite.acces_fonctionnalite_fonction_defaut (id, fonctionnalite_id, fonction_id, actif)
+ VALUES (nextVal('securite.acces_fonctionnalite_fonction_defaut_id_seq'), (SELECT id FROM securite.fonctionnalite WHERE code = 'FICHE_ELEVE_CONSEIL'), (SELECT id FROM ent.fonction WHERE code = 'SUR'), false);
+
+ <!--FIN FICHE ELEVE-->
+
+ </sql>
+
+ </changeSet>
+
+</databaseChangeLog>
\ No newline at end of file
-->
<databaseChangeLog
- xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">
+ xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">
<changeSet id="-1" author="onic">
<preConditions onFail="MARK_RAN" onFailMessage="L'échec de la pré-condition n'est pas une erreur mais indique que le langage 'plpgsql' existe et ne nécessite pas d'être crée.">
--
- -- Name: uk_resultat_classe_enseignment_periode; Type: CONSTRAINT;
+ -- Name: uk_resultat_classe_enseignment_periode; Type: CONSTRAINT;
-- Schema: entnotes; Tablespace:
--
--
- -- Name: uk_resultat_classe_service_periode; Type: CONSTRAINT;
+ -- Name: uk_resultat_classe_service_periode; Type: CONSTRAINT;
-- Schema: entnotes; Tablespace:
--
--
- -- Name: uk_resultat_eleve_service_periode; Type: CONSTRAINT;
+ -- Name: uk_resultat_eleve_service_periode; Type: CONSTRAINT;
-- Schema: entnotes; Tablespace:
--
--
- -- Name: uq_modele_appreciation_professeur_autorite_id_texte;
+ -- Name: uq_modele_appreciation_professeur_autorite_id_texte;
-- Type: CONSTRAINT; Schema: entnotes; Tablespace:
--
--
- -- Name: uq_resultat_eleve_sous_service_periode; Type: CONSTRAINT;
+ -- Name: uq_resultat_eleve_sous_service_periode; Type: CONSTRAINT;
-- Schema: entnotes; Tablespace:
--
--
- -- Name: pk_partenaire_a_prevenir_incident; Type: CONSTRAINT;
+ -- Name: pk_partenaire_a_prevenir_incident; Type: CONSTRAINT;
-- Schema: enttemps; Tablespace:
--
--
- -- Name: pk_preferences_etablissement_absences; Type: CONSTRAINT;
+ -- Name: pk_preferences_etablissement_absences; Type: CONSTRAINT;
-- Schema: enttemps; Tablespace:
--
--
- -- Name: pk_preferences_utilisateur_agenda; Type: CONSTRAINT;
+ -- Name: pk_preferences_utilisateur_agenda; Type: CONSTRAINT;
-- Schema: enttemps; Tablespace:
--
--
- -- Name: uk_appel_ligne_appel_personne; Type: CONSTRAINT;
+ -- Name: uk_appel_ligne_appel_personne; Type: CONSTRAINT;
-- Schema: enttemps; Tablespace:
--
--
- -- Name: uk_lieu_incident_preferences_etablissement_libelle;
+ -- Name: uk_lieu_incident_preferences_etablissement_libelle;
-- Type: CONSTRAINT; Schema: enttemps; Tablespace:
--
--
- -- Name: uk_partenaire_a_prevenir_incident; Type: CONSTRAINT;
+ -- Name: uk_partenaire_a_prevenir_incident; Type: CONSTRAINT;
-- Schema: enttemps; Tablespace:
--
--
- -- Name: uk_partenaire_prevenir_preferences_etablissement_libelle;
+ -- Name: uk_partenaire_prevenir_preferences_etablissement_libelle;
-- Type: CONSTRAINT; Schema: enttemps; Tablespace:
--
--
- -- Name: uk_preferences_etablissement_absences_annee_scolaire;
+ -- Name: uk_preferences_etablissement_absences_annee_scolaire;
-- Type: CONSTRAINT; Schema: enttemps; Tablespace:
--
--
- -- Name: uk_preferences_etablissement_absences_id_libelle;
+ -- Name: uk_preferences_etablissement_absences_id_libelle;
-- Type: CONSTRAINT; Schema: enttemps; Tablespace:
--
--
- -- Name: uk_preferences_utilisateur_agenda; Type: CONSTRAINT;
+ -- Name: uk_preferences_utilisateur_agenda; Type: CONSTRAINT;
-- Schema: enttemps; Tablespace:
--
--
- -- Name: uk_qualite_protagoniste_preferences_etablissement_libelle;
+ -- Name: uk_qualite_protagoniste_preferences_etablissement_libelle;
-- Type: CONSTRAINT; Schema: enttemps; Tablespace:
--
--
- -- Name: uk_type_incident_preferences_etablissement_libelle;
+ -- Name: uk_type_incident_preferences_etablissement_libelle;
-- Type: CONSTRAINT; Schema: enttemps; Tablespace:
--
--
- -- Name: uk_type_punition_preferences_etablissement_libelle;
+ -- Name: uk_type_punition_preferences_etablissement_libelle;
-- Type: CONSTRAINT; Schema: enttemps; Tablespace:
--
--
- -- Name: uk_type_sanction_preferences_etablissement_libelle;
+ -- Name: uk_type_sanction_preferences_etablissement_libelle;
-- Type: CONSTRAINT; Schema: enttemps; Tablespace:
--
--
- -- Name: pk_template_type_fonctionnalite; Type: CONSTRAINT;
+ -- Name: pk_template_type_fonctionnalite; Type: CONSTRAINT;
-- Schema: impression; Tablespace:
--
--
- -- Name: uk_template_doc_sous_template_eliot_param_template_doc_id;
+ -- Name: uk_template_doc_sous_template_eliot_param_template_doc_id;
-- Type: CONSTRAINT; Schema: impression; Tablespace:
--
--
- -- Name: uk_template_document_nom_etab; Type: CONSTRAINT;
+ -- Name: uk_template_document_nom_etab; Type: CONSTRAINT;
-- Schema: impression; Tablespace:
--
--
- -- Name: uk_template_type_donnees_code; Type: CONSTRAINT;
+ -- Name: uk_template_type_donnees_code; Type: CONSTRAINT;
-- Schema: impression; Tablespace:
--
--
- -- Name: uk_autorite_id_enregistrement_cible_nom_entite_cible;
+ -- Name: uk_autorite_id_enregistrement_cible_nom_entite_cible;
-- Type: CONSTRAINT; Schema: securite; Tablespace:
--
--
- -- Name: uk_item_id_enregistrement_cible_nom_entite_cible;
+ -- Name: uk_item_id_enregistrement_cible_nom_entite_cible;
-- Type: CONSTRAINT; Schema: securite; Tablespace:
--
--
- -- Name: uk_perimetre_id_enregistrement_cible_nom_entite_cible;
+ -- Name: uk_perimetre_id_enregistrement_cible_nom_entite_cible;
-- Type: CONSTRAINT; Schema: securite; Tablespace:
--
--
- -- Name: uq_autorisation_item_autorite; Type: CONSTRAINT;
+ -- Name: uq_autorisation_item_autorite; Type: CONSTRAINT;
-- Schema: securite; Tablespace:
--
SET search_path = ent, pg_catalog;
--
- -- Name: idx_appartenance_groupe_groupe_enfant_id; Type: INDEX;
+ -- Name: idx_appartenance_groupe_groupe_enfant_id; Type: INDEX;
-- Schema: ent; Tablespace:
--
--
- -- Name: idx_appartenance_personne_groupe_groupe_personnes_id;
+ -- Name: idx_appartenance_personne_groupe_groupe_personnes_id;
-- Type: INDEX; Schema: ent; Tablespace:
--
--
- -- Name: idx_personne_proprietes_scolarite_active; Type: INDEX;
+ -- Name: idx_personne_proprietes_scolarite_active; Type: INDEX;
-- Schema: ent; Tablespace:
--
--
- -- Name: idx_personne_props_scolarite_personne_id; Type: INDEX;
+ -- Name: idx_personne_props_scolarite_personne_id; Type: INDEX;
-- Schema: ent; Tablespace:
--
--
- -- Name: idx_cahier_de_textes_parent_incorporation; Type: INDEX;
+ -- Name: idx_cahier_de_textes_parent_incorporation; Type: INDEX;
-- Schema: entcdt; Tablespace:
--
</sql>
</changeSet>
+ <changeSet id="1" author="agia">
+
+ <comment>
+ Ajout de la fonction "ORIENTATION"
+ </comment>
+
+ <sql>
+ INSERT INTO ent.fonction (id, code, libelle)
+ SELECT nextVal('ent.fonction_id_seq'), 'ORI', 'ORIENTATION'
+ WHERE NOT EXISTS (SELECT * FROM ent.fonction
+ WHERE code LIKE 'ORI');
+ </sql>
+
+ </changeSet>
+
+ <changeSet id="2" author="agia">
+
+ <comment>
+ Ajout de la fonction "ASSISTANT_EDUCATION"
+ </comment>
+
+ <sql>
+ INSERT INTO ent.fonction (id, code, libelle)
+ SELECT nextVal('ent.fonction_id_seq'), 'AED', 'ASSISTANT_EDUCATION'
+ WHERE NOT EXISTS (SELECT * FROM ent.fonction
+ WHERE code LIKE 'AED');
+ </sql>
+
+ </changeSet>
+
+ <changeSet id="3" author="agia">
+
+ <comment>
+ Ajout de la fonction "AUXILIAIRE_VIE_SCOLAIRE"
+ </comment>
+
+ <sql>
+ INSERT INTO ent.fonction (id, code, libelle)
+ SELECT nextVal('ent.fonction_id_seq'), 'AVS', 'AUXILIAIRE_VIE_SCOLAIRE'
+ WHERE NOT EXISTS (SELECT * FROM ent.fonction
+ WHERE code LIKE 'AVS');
+ </sql>
+
+ </changeSet>
+
+ <changeSet id="4" author="agia">
+
+ <comment>
+ Ajout de la fonction "APPRENTISSAGE"
+ </comment>
+
+ <sql>
+ INSERT INTO ent.fonction (id, code, libelle)
+ SELECT nextVal('ent.fonction_id_seq'), 'APP', 'APPRENTISSAGE'
+ WHERE NOT EXISTS (SELECT * FROM ent.fonction
+ WHERE code LIKE 'APP');
+ </sql>
+
+ </changeSet>
+
</databaseChangeLog>
<include file="changelogs/scolarite/annuaire_interface/2013-06-14-0028553.xml"/>
<include file="changelogs/scolarite/annuaire_interface/2013-06-17-0028607.xml"/>
<include file="changelogs/scolarite/2013-06-21-0028607.xml"/>
+ <include file="changelogs/scolarite/2013-06-04-0027533.xml"/>
+ <include file="changelogs/scolarite/2013-06-06-0027533.xml"/>
+ <include file="changelogs/scolarite/2013-06-10-0027533.xml"/>
+ <include file="changelogs/scolarite/2013-06-11-0027533.xml"/>
+ <include file="changelogs/scolarite/2013-06-11-0027533-2.xml"/>
+ <include file="changelogs/scolarite/2013-06-12-0027533.xml"/>
+ <include file="changelogs/scolarite/2013-06-12-0027533-2.xml"/>
+ <include file="changelogs/scolarite/2013-06-13-0027533.xml"/>
</databaseChangeLog>
public static final String NO_AUT_SUPPRESSION = "Pas l'autorisation de suppression";
public static final String NO_AUT_CONSULTATION_PERMISSIONS = "Pas l'autorisation de consulter les permissions";
public static final String NO_AUT_MODIFICATION_PERMISSIONS = "Pas l'autorisation de modifier les permissions";
+ public static final String NO_AUT_FONCTIONNALITE = "Pas l'autorisation d'accéder à la fonctionnalité";
public AutorisationException(String message) {
super(message);
return new AutorisationException(NO_AUT_MODIFICATION_PERMISSIONS);
}
+ public static AutorisationException fonctionnaliteException() {
+ return new AutorisationException(NO_AUT_FONCTIONNALITE);
+ }
+
}
import org.lilie.services.eliot.absences.parametrage.incidentpunitionsanction.AbsencesTypeIncidentService
import org.lilie.services.eliot.absences.parametrage.incidentpunitionsanction.PartenaireAPrevenirService
import org.lilie.services.eliot.absences.parametrage.incidentpunitionsanction.QualiteProtagonisteService
-import org.lilie.services.eliot.absences.fonctionnalites.AbsencesFonctionnalite
+
import org.lilie.services.eliot.securite.AutorisationException
import java.text.SimpleDateFormat
import org.lilie.services.eliot.absences.parametrage.incidentpunitionsanction.AbsencesTypePunitionService
import org.lilie.services.eliot.absences.breadcrumbs.MenuAideAbsencesService
import org.lilie.services.eliot.urllabel.aide.AideItemInfo
import grails.converters.JSON
+import org.lilie.services.eliot.absences.securite.DroitsSessionService
+import org.lilie.services.eliot.absences.fonctionnalites.AbsencesFonctionnaliteAnc
/**
* Classe ancêtre embarquant des traitements génériques à tous les controleurs d'absences
import grails.converters.JSON
import org.lilie.services.eliot.scolarite.Etablissement
import java.text.SimpleDateFormat
-
import org.lilie.services.eliot.scolarite.StructureEnseignement
-
import org.lilie.services.eliot.securite.impl.Autorite
-
import org.codehaus.groovy.grails.commons.ConfigurationHolder
-import org.lilie.services.eliot.absences.fonctionnalites.AbsencesFonctionnalite
import org.lilie.services.eliot.scolarite.structureenseignement.LocalStructureEnseignementService
import org.lilie.services.eliot.SessionUtils
import org.lilie.services.eliot.scolarite.Calendrier
import org.lilie.services.eliot.parametrages.calendrier.CalendrierService
import org.lilie.services.eliot.annuaire.SecuriteSession
-
import org.lilie.services.eliot.scolarite.Personne
import org.lilie.services.eliot.temps.DateUtil
import org.lilie.services.eliot.absences.AppelLigne
import org.lilie.services.eliot.applications.absences.BasicCriteresRecherche
import org.lilie.services.eliot.applications.absences.AbsencesType
import org.lilie.services.eliot.scolarite.personne.eleve.EleveAnnuaireService
-
import org.lilie.services.eliot.export.DonneesPourExportCSV
import org.lilie.services.eliot.absences.export.AbsencesPreparationExportCSVService
import javax.servlet.http.HttpServletResponse
import org.lilie.services.eliot.absences.Motif
import org.lilie.services.eliot.applications.absences.PriseEnCompteMotif
import org.lilie.services.eliot.absences.statistiques.CalendrierAbsencesService
+import org.lilie.services.eliot.absences.AbsencesFonctionnalite
class ConsultationController extends AbstractConsultationController {
def multicriteresIndex = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.CONSULTATION_ABSENCES)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_CONSULT)
// construction du modèle
Map modele = prepareBaseModele(Page.CONSULTATION_MULTICRITERES)
def absencesIndex = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.CONSULTATION_ABSENCES)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_CONSULT)
// construction du modèle
Map modele = prepareBaseModele(Page.CONSULTATION_ABSENCES_DU_JOUR)
}
def retardsIndex = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.CONSULTATION_ABSENCES)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_CONSULT)
// construction du modèle
Map modele = prepareBaseModele(Page.CONSULTATION_RETARDS_DU_JOUR)
}
def departsIndex = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.CONSULTATION_ABSENCES)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_CONSULT)
// construction du modèle
Map modele = prepareBaseModele(Page.CONSULTATION_DEPARTS_DU_JOUR)
}
def internatIndex = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.CONSULTATION_ABSENCES)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_CONSULT)
// construction du modèle
Map modele = prepareBaseModele(Page.CONSULTATION_INTERNAT)
}
def demiPensionIndex = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.CONSULTATION_ABSENCES)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_CONSULT)
// construction du modèle
Map modele = prepareBaseModele(Page.CONSULTATION_DEMI_PENSION)
}
def consultationParParentIndex = {
- if(traiteChangementEtablissement(params, Page.CONSULTATION_PAR_PARENT)){
+ if (traiteChangementEtablissement(params, Page.CONSULTATION_PAR_PARENT)) {
return
}
- verificationDroitFonctionnalite(
- AbsencesFonctionnalite.CONSULTATION_ABSENCES_PARENT
- )
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_CONSULT_PARENT)
// construction du modèle
Map modele = prepareBaseModele(Page.CONSULTATION_PAR_PARENT)
Calendrier calendrier = getCalendrier()
}
def consultationParEleveIndex = {
- verificationDroitFonctionnalite(
- AbsencesFonctionnalite.CONSULTATION_ABSENCES_ELEVE
- )
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_CONSULT_ELEVE)
// construction du modèle
Map modele = prepareBaseModele(Page.CONSULTATION_PAR_ELEVE)
}
def consultationParEnseignantIndex = {
- verificationDroitFonctionnalite(
- AbsencesFonctionnalite.CONSULTATION_ABSENCES_ENSEIGNANT
- )
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_CONSULT_ENSEIGNANT)
// construction du modèle
Map modele = prepareBaseModele(Page.CONSULTATION_PAR_ENSEIGNANT)
*/
private def exporteCsv(def jsonParams, HttpServletResponse response, String nomFichier) {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.CONSULTATION_ABSENCES)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_CONSULT)
ResultatConsultation listeBilan = traduitResultatBilan(
getAbsencesSelonCriteres(
* Pour la vue des bilans d'absences et retards
*/
def listerBilanAbsenceRetard = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.CONSULTATION_ABSENCES)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_CONSULT)
ResultatConsultation listeBilan = traduitResultatBilan(
getAbsencesSelonCriteres(
(Map) JSON.parse(params.params),
def getDemiPensions = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.CONSULTATION_ABSENCES)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_CONSULT)
Map parametres = JSON.parse(params.params)
parametres.type = AbsencesType.DEMI_PENSION.id
ResultatConsultation listeBilan = traduitResultatBilan(
}
def getInternats = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.CONSULTATION_ABSENCES)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_CONSULT)
Map parametres = JSON.parse(params.params)
parametres.type = AbsencesType.INTERNAT.id
ResultatConsultation listeBilan = traduitResultatBilan(
package org.lilie.services.eliot.absences.consultation.appelsoublies
import org.lilie.services.eliot.absences.consultation.AbstractConsultationController
-import org.lilie.services.eliot.absences.fonctionnalites.AbsencesFonctionnalite
+
import org.lilie.services.eliot.absences.page.Page
import grails.converters.JSON
import org.lilie.services.eliot.scolarite.Calendrier
import org.lilie.services.eliot.temps.TempsAgendaService
import org.lilie.services.eliot.urllabel.breadcrumbs.BreadCrumbsItemInfo
import org.lilie.services.eliot.urllabel.UrlLabelInfo
+import org.lilie.services.eliot.absences.fonctionnalites.AbsencesFonctionnaliteAnc
+import org.lilie.services.eliot.absences.AbsencesFonctionnalite
/**
* Contrôleur de consultation des appels oubliés
private final static Long VALEUR_TOUS_STRUCTURES = (Long) -1
def index = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.CONSULTATION_APPELS_OUBLIES)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_CONSULT)
// construction du modèle
Map modele = prepareBaseModele(Page.CONSULTATION_APPELS_OUBLIES)
package org.lilie.services.eliot.absences.consultation.registremensuel
import org.lilie.services.eliot.absences.consultation.AbstractConsultationController
-import org.lilie.services.eliot.absences.fonctionnalites.AbsencesFonctionnalite
+
import org.lilie.services.eliot.absences.page.Page
import grails.converters.JSON
import org.lilie.services.eliot.applications.absences.AbsencesType
import org.lilie.services.eliot.parametrages.calendrier.PlageHoraireService
import org.lilie.services.eliot.urllabel.breadcrumbs.BreadCrumbsItemInfo
import org.lilie.services.eliot.urllabel.UrlLabelInfo
+import org.lilie.services.eliot.absences.AbsencesFonctionnalite
/**
* Contrôleur de consultation des registre mensuel
PlageHoraireService plageHoraireService
def index = {
- verificationDroitFonctionnalite(
- AbsencesFonctionnalite.CONSULTATION_REGISTRE_MENSUEL
- )
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_CONSULT)
// construction du modèle
Map modele = prepareBaseModele(Page.CONSULTATION_REGISTRE_MENSUEL)
*/
@SuppressWarnings("CatchException")
def getRegistreMensuelStructure = { RegistreMensuelCommand command ->
- verificationDroitFonctionnalite(
- AbsencesFonctionnalite.CONSULTATION_REGISTRE_MENSUEL
- )
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_CONSULT)
// Date de début de la recherche initialiser au premier jour du mois 00h00
Calendar dateDebutRecherche = getDateFromMoisId(command.moisId)
try {
List<RegistreLigneInfo> result =
- registreMensuelService.getRegistreMensuel(
- securiteSession,
- command
- )
+ registreMensuelService.getRegistreMensuel(
+ securiteSession,
+ command
+ )
result[0]
DetailJourCommand detailJourCommand = new DetailJourCommand(
eleveId: result[0].eleve.autorite.id,
@SuppressWarnings("CatchException")
def getDetailJour = { DetailJourCommand command ->
try {
- verificationDroitFonctionnalite(
- AbsencesFonctionnalite.CONSULTATION_REGISTRE_MENSUEL
- )
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_CONSULT)
DetailJourInfo detail = registreMensuelService.getDetailJour(
command,
protected List<UrlLabelInfo> getBreadCrumbsInfo() {
List<UrlLabelInfo> breadCrumbsInfo = super.getBreadCrumbsInfo()
- breadCrumbsInfo << new BreadCrumbsItemInfo (
- codeLabel : message(code: 'absences.breadCrumbs.consultation')
- )
- breadCrumbsInfo << new BreadCrumbsItemInfo (
- codeLabel : message(
- code: 'absences.breadCrumbs.consultation.registreMensuel')
- )
+ breadCrumbsInfo << new BreadCrumbsItemInfo(
+ codeLabel: message(code: 'absences.breadCrumbs.consultation')
+ )
+ breadCrumbsInfo << new BreadCrumbsItemInfo(
+ codeLabel: message(
+ code: 'absences.breadCrumbs.consultation.registreMensuel')
+ )
return breadCrumbsInfo
-
+
}
private String exportePlagesHorairesAsJson(List<PlageHoraire> plagesHoraires) {
import org.lilie.services.eliot.securite.AutorisationException
import org.lilie.services.eliot.annuaire.FonctionEnum
import org.lilie.services.eliot.annuaire.SecuriteSession
-import org.lilie.services.eliot.basculeannee.BasculeAnneeVerrouService
import org.lilie.services.eliot.basculeannee.etape.EtapeService
import org.lilie.services.eliot.applications.ModuleEliot
class MaintenanceController {
AnneeScolaireService anneeScolaireService
- BasculeAnneeVerrouService basculeAnneeVerrouService
EtapeService etapeService
def index = {
package org.lilie.services.eliot.absences.page
import org.lilie.services.eliot.absences.ConstantesControleurs
-import org.lilie.services.eliot.absences.fonctionnalites.AbsencesFonctionnalite
+import org.lilie.services.eliot.absences.fonctionnalites.AbsencesFonctionnaliteAnc
+import org.lilie.services.eliot.absences.AbsencesFonctionnalite
/**
* La liste des pages de l'application eliot-absences
public enum Page {
SAISIE_ABSENCES_CPE(
GroupePage.SAISIE,
- AbsencesFonctionnalite.SAISIE_ABSENCES_CPE,
+ AbsencesFonctionnalite.ABS_SAISIE_APPELS,
ConstantesControleurs.CONTROLLER_NAME_SAISIE_ABSENCES,
ConstantesControleurs.ACTION_NAME_SAISIE_CPE
),
SAISIE_ABSENCES_PROF(
GroupePage.SAISIE,
- AbsencesFonctionnalite.SAISIE_ABSENCES_PROF,
+ AbsencesFonctionnalite.ABS_SAISIE_APPELS_EN_CLASSE,
ConstantesControleurs.CONTROLLER_NAME_SAISIE_ABSENCES,
ConstantesControleurs.ACTION_NAME_SAISIE_PROF
),
STATISTIQUE_TEMPS_REEL(
GroupePage.STATISTIQUE,
- AbsencesFonctionnalite.STATISTIQUES_TEMPS_REEL,
+ AbsencesFonctionnalite.ABS_STATS,
ConstantesControleurs.CONTROLLER_NAME_STATISTIQUES_TEMPS_REEL,
ConstantesControleurs.ACTION_NAME_INDEX
),
STATISTIQUES_TABLEAU_DE_BORD(
GroupePage.STATISTIQUE,
- AbsencesFonctionnalite.STATISTIQUES_TABLEAU_DE_BORD,
+ AbsencesFonctionnalite.ABS_STATS,
ConstantesControleurs.CONTROLLER_NAME_STATISTIQUES_TABLEAU_DE_BORD,
ConstantesControleurs.ACTION_NAME_INDEX
),
STATISTIQUES_HEBDOMADAIRE(
GroupePage.STATISTIQUE,
- AbsencesFonctionnalite.STATISTIQUES_HEBDOMADAIRE,
+ AbsencesFonctionnalite.ABS_STATS,
ConstantesControleurs.CONTROLLER_NAME_STATISTIQUES_HEBDOMADAIRE,
ConstantesControleurs.ACTION_NAME_INDEX
),
PUBLIPOSTAGE_SELECTION(
GroupePage.PUBLIPOSTAGE,
- AbsencesFonctionnalite.PUBLIPOSTAGE_SELECTION,
+ AbsencesFonctionnalite.ABS_PUBLIPOSTAGE,
ConstantesControleurs.CONTROLLER_NAME_PUBLIPOSTAGE_SELECTION,
ConstantesControleurs.ACTION_NAME_INDEX
),
PUBLIPOSTAGE_SUIVI_PAR_ELEVE(
GroupePage.PUBLIPOSTAGE,
- AbsencesFonctionnalite.PUBLIPOSTAGE_SUIVI_PAR_ELEVE,
+ AbsencesFonctionnalite.ABS_PUBLIPOSTAGE,
ConstantesControleurs.CONTROLLER_NAME_PUBLIPOSTAGE_SUIVI_PAR_ELEVE,
ConstantesControleurs.ACTION_NAME_INDEX
),
PUBLIPOSTAGE_SUIVI_IMPRESSION(
GroupePage.PUBLIPOSTAGE,
- AbsencesFonctionnalite.PUBLIPOSTAGE_SUIVI_IMPRESSION,
+ AbsencesFonctionnalite.ABS_PUBLIPOSTAGE,
ConstantesControleurs.CONTROLLER_NAME_PUBLIPOSTAGE_SUIVI_IMPRESSION,
ConstantesControleurs.ACTION_NAME_INDEX
),
SAISIE_INCIDENTS(
GroupePage.SAISIE,
- AbsencesFonctionnalite.SAISIE_INCIDENTS,
+ AbsencesFonctionnalite.ABS_SAISIE_INC_PUN_SAN,
ConstantesControleurs.CONTROLLER_NAME_SAISIE_INCIDENTS,
ConstantesControleurs.ACTION_NAME_INDEX
),
SAISIE_PUNITIONS(
GroupePage.SAISIE,
- AbsencesFonctionnalite.SAISIE_PUNITIONS,
+ AbsencesFonctionnalite.ABS_SAISIE_INC_PUN_SAN,
ConstantesControleurs.CONTROLLER_NAME_SAISIE_PUNITIONS,
ConstantesControleurs.ACTION_NAME_INDEX
),
SAISIE_SANCTIONS(
GroupePage.SAISIE,
- AbsencesFonctionnalite.SAISIE_SANCTIONS,
+ AbsencesFonctionnalite.ABS_SAISIE_INC_PUN_SAN,
ConstantesControleurs.CONTROLLER_NAME_SAISIE_SANCTIONS,
ConstantesControleurs.ACTION_NAME_INDEX
),
SAISIE_HEBDOMADAIRE_PAR_CLASSE(
GroupePage.SAISIE,
- AbsencesFonctionnalite.SAISIE_HEBDOMADAIRE_PAR_CLASSE,
+ AbsencesFonctionnalite.ABS_SAISIE_ABS_RETARDS_DEPARTS,
ConstantesControleurs.CONTROLLER_NAME_SAISIE_HEBDOMADAIRE,
ConstantesControleurs.ACTION_NAME_SAISIE_PAR_CLASSE
),
SAISIE_HEBDOMADAIRE_PAR_ELEVE(
GroupePage.SAISIE,
- AbsencesFonctionnalite.SAISIE_HEBDOMADAIRE_PAR_ELEVE,
+ AbsencesFonctionnalite.ABS_SAISIE_ABS_RETARDS_DEPARTS,
ConstantesControleurs.CONTROLLER_NAME_SAISIE_HEBDOMADAIRE,
ConstantesControleurs.ACTION_NAME_SAISIE_PAR_ELEVE
),
SAISIE_DISPENSES(
GroupePage.SAISIE,
- AbsencesFonctionnalite.SAISIE_DISPENSES,
+ AbsencesFonctionnaliteAnc.SAISIE_DISPENSES,
ConstantesControleurs.CONTROLLER_NAME_SAISIE_DISPENSES,
ConstantesControleurs.ACTION_NAME_SAISIE_DISPENSES,
),
SAISIE_COLLECTIVE(
GroupePage.SAISIE,
- AbsencesFonctionnalite.SAISIE_COLLECTIVE,
+ AbsencesFonctionnalite.ABS_SAISIE_ABS_RETARDS_DEPARTS,
ConstantesControleurs.CONTROLLER_NAME_SAISIE_COLLECTIVE,
ConstantesControleurs.ACTION_NAME_SAISIE_COLLECTIVE,
),
SAISIE_DEMI_PENSION(
GroupePage.SAISIE,
- AbsencesFonctionnalite.SAISIE_DEMI_PENSION,
+ AbsencesFonctionnalite.ABS_SAISIE_DEMI_PENSION_INTERNAT,
ConstantesControleurs.CONTROLLER_NAME_SAISIE_DEMI_PENSION_INTERNAT,
ConstantesControleurs.ACTION_NAME_INDEX_DEMI_PENSION
),
SAISIE_INTERNAT(
GroupePage.SAISIE,
- AbsencesFonctionnalite.SAISIE_INTERNAT,
+ AbsencesFonctionnalite.ABS_SAISIE_DEMI_PENSION_INTERNAT,
ConstantesControleurs.CONTROLLER_NAME_SAISIE_DEMI_PENSION_INTERNAT,
ConstantesControleurs.ACTION_NAME_INDEX_INTERNAT
),
CONSULTATION_MULTICRITERES(
GroupePage.CONSULTATION,
- AbsencesFonctionnalite.CONSULTATION_ABSENCES,
+ AbsencesFonctionnalite.ABS_CONSULT,
ConstantesControleurs.CONTROLLER_NAME_CONSULTATION,
ConstantesControleurs.ACTION_NAME_MULTICRITERE_INDEX
),
CONSULTATION_ABSENCES_DU_JOUR(
GroupePage.CONSULTATION,
- AbsencesFonctionnalite.CONSULTATION_ABSENCES,
+ AbsencesFonctionnalite.ABS_CONSULT,
ConstantesControleurs.CONTROLLER_NAME_CONSULTATION,
ConstantesControleurs.ACTION_NAME_ABSENCES_DUJOUR_INDEX
),
CONSULTATION_RETARDS_DU_JOUR(
GroupePage.CONSULTATION,
- AbsencesFonctionnalite.CONSULTATION_ABSENCES,
+ AbsencesFonctionnalite.ABS_CONSULT,
ConstantesControleurs.CONTROLLER_NAME_CONSULTATION,
ConstantesControleurs.ACTION_NAME_RETARDS_DUJOUR_INDEX
),
CONSULTATION_DEPARTS_DU_JOUR(
GroupePage.CONSULTATION,
- AbsencesFonctionnalite.CONSULTATION_ABSENCES,
+ AbsencesFonctionnalite.ABS_CONSULT,
ConstantesControleurs.CONTROLLER_NAME_CONSULTATION,
ConstantesControleurs.ACTION_NAME_DEPARTS_DUJOUR_INDEX
),
CONSULTATION_INTERNAT(
GroupePage.CONSULTATION,
- AbsencesFonctionnalite.CONSULTATION_ABSENCES,
+ AbsencesFonctionnalite.ABS_CONSULT,
ConstantesControleurs.CONTROLLER_NAME_CONSULTATION,
ConstantesControleurs.ACTION_NAME_INTERNAT_INDEX
),
CONSULTATION_DEMI_PENSION(
GroupePage.CONSULTATION,
- AbsencesFonctionnalite.CONSULTATION_ABSENCES,
+ AbsencesFonctionnalite.ABS_CONSULT,
ConstantesControleurs.CONTROLLER_NAME_CONSULTATION,
ConstantesControleurs.ACTION_NAME_DEMI_PENSION_INDEX
),
CONSULTATION_PAR_PARENT(
GroupePage.CONSULTATION,
- AbsencesFonctionnalite.CONSULTATION_ABSENCES_PARENT,
+ AbsencesFonctionnalite.ABS_CONSULT_PARENT,
ConstantesControleurs.CONTROLLER_NAME_CONSULTATION,
ConstantesControleurs.ACTION_NAME_PAR_PARENT_INDEX
),
CONSULTATION_PAR_ELEVE(
GroupePage.CONSULTATION,
- AbsencesFonctionnalite.CONSULTATION_ABSENCES_ELEVE,
+ AbsencesFonctionnalite.ABS_CONSULT_ELEVE,
ConstantesControleurs.CONTROLLER_NAME_CONSULTATION,
ConstantesControleurs.ACTION_NAME_PAR_ELEVE_INDEX
),
CONSULTATION_PAR_ENSEIGNANT(
GroupePage.CONSULTATION,
- AbsencesFonctionnalite.CONSULTATION_ABSENCES_ENSEIGNANT,
+ AbsencesFonctionnalite.ABS_CONSULT_ENSEIGNANT,
ConstantesControleurs.CONTROLLER_NAME_CONSULTATION,
ConstantesControleurs.ACTION_NAME_PAR_ENSEIGNANT_INDEX
),
CONSULTATION_APPELS_OUBLIES(
GroupePage.CONSULTATION,
- AbsencesFonctionnalite.CONSULTATION_APPELS_OUBLIES,
+ AbsencesFonctionnalite.ABS_CONSULT,
ConstantesControleurs.CONTROLLER_NAME_APPELS_OUBLIES,
ConstantesControleurs.ACTION_NAME_INDEX
),
CONSULTATION_REGISTRE_MENSUEL(
GroupePage.CONSULTATION,
- AbsencesFonctionnalite.CONSULTATION_REGISTRE_MENSUEL,
+ AbsencesFonctionnalite.ABS_CONSULT,
ConstantesControleurs.CONTROLLER_NAME_REGISTRE_MENSUEL,
ConstantesControleurs.ACTION_NAME_INDEX
),
PARAMETRAGE_MOTIFS(
GroupePage.PARAMETRAGE,
- AbsencesFonctionnalite.PARAMETRAGE_MOTIF,
+ AbsencesFonctionnalite.ABS_PARAM_MOTIFS,
ConstantesControleurs.CONTROLLER_NAME_PARAMETRAGE_MOTIF,
ConstantesControleurs.ACTION_NAME_INDEX
),
PARAMETRAGE_GENERAL(
GroupePage.PARAMETRAGE,
- AbsencesFonctionnalite.PARAMETRAGE_GENERAL,
+ AbsencesFonctionnalite.ABS_PARAM_GENERAUX,
ConstantesControleurs.CONTROLLER_NAME_PARAMETRAGE_GENERAL,
ConstantesControleurs.ACTION_NAME_INDEX
),
PARAMETRAGES_IPS(
GroupePage.PARAMETRAGE,
- AbsencesFonctionnalite.PARAMETRAGE_IPS,
+ AbsencesFonctionnalite.ABS_PARAM_INC_PUN_SAN,
ConstantesControleurs.CONTROLLER_NAME_PARAMETRAGE_IPS,
ConstantesControleurs.ACTION_NAME_INDEX
),
NOTIFICATION_PREFERNCE_UTILISATEUR(
GroupePage.AUCUNE,
- AbsencesFonctionnalite.NOTIFICATION_PREFERNCE_UTILISATEUR,
+ AbsencesFonctionnaliteAnc.NOTIFICATION_PREFERNCE_UTILISATEUR,
ConstantesControleurs.CONTROLLER_NOTIFICATION_PREFERNCE_UTILISATEUR,
ConstantesControleurs.ACTION_NAME_INDEX
)
private GroupePage groupePage
- private AbsencesFonctionnalite absencesFonctionnalite
+ private AbsencesFonctionnaliteAnc absencesFonctionnalite
private String controllerName
private String actionName
private Page(GroupePage groupePage,
- AbsencesFonctionnalite absencesFonctionnalite,
+ AbsencesFonctionnaliteAnc absencesFonctionnalite,
String controleur,
String action) {
this.groupePage = groupePage
return groupePage
}
- public AbsencesFonctionnalite getAbsencesFonctionnalite() {
+ public AbsencesFonctionnaliteAnc getAbsencesFonctionnalite() {
return absencesFonctionnalite
}
import org.lilie.services.eliot.absences.page.Page
import org.lilie.services.eliot.absences.PreferencesEtablissementAbsences
import grails.converters.JSON
-import org.lilie.services.eliot.absences.fonctionnalites.AbsencesFonctionnalite
import org.lilie.services.eliot.urllabel.breadcrumbs.BreadCrumbsItemInfo
import org.lilie.services.eliot.urllabel.UrlLabelInfo
import org.lilie.services.eliot.absences.TauxAbsencesCalculMode
+import org.lilie.services.eliot.absences.AbsencesFonctionnalite
/**
* @author bahj
AbsencesGeneralService absencesGeneralService
def index = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_GENERAL)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_GENERAUX)
PreferencesEtablissementAbsences pref = getPreferencesEtablissementCourant()
}
def setParametresGenerals = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_GENERAL)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_GENERAUX)
Map resultats = [
success: true,
message: message(code:
import org.lilie.services.eliot.absences.PartenaireAPrevenir
import org.lilie.services.eliot.absences.LieuIncident
import org.lilie.services.eliot.absences.parametrage.incidentpunitionsanction.exceptions.SuppressionContraintException
-import org.lilie.services.eliot.absences.fonctionnalites.AbsencesFonctionnalite
import org.lilie.services.eliot.urllabel.breadcrumbs.BreadCrumbsItemInfo
import org.lilie.services.eliot.urllabel.UrlLabelInfo
+import org.lilie.services.eliot.absences.AbsencesFonctionnalite
/**
* @author bahj
class ParametrageIncPunSanController extends AbstractAbsencesController {
def index = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_IPS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_INC_PUN_SAN)
Map model = prepareBaseModele(Page.PARAMETRAGES_IPS)
def idOnglet = params.onglet ? params.onglet : null
//--------- Types d'incident -------------------
def getTypesIncident = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_IPS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_INC_PUN_SAN)
List<Map> resultats = getAllTypesIncident()
render resultats as JSON
}
def creeTypeIncident = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_IPS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_INC_PUN_SAN)
String libelle = params.libelle
Map resultats
PreferencesEtablissementAbsences pref = getPreferencesEtablissementCourant()
}
def modifieTypeIncident = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_IPS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_INC_PUN_SAN)
Long identifiant = Long.parseLong(params.id)
String libelle = params.libelle
Map resultats
}
def supprimeTypeIncident = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_IPS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_INC_PUN_SAN)
Long identifiant = Long.parseLong(params.id)
Map resultats
TypeIncident type = TypeIncident.get(identifiant)
//--------- Types de sanction ------------------
def getTypesSanction = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_IPS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_INC_PUN_SAN)
List<Map> resultats = getAllTypesSanction()
render resultats as JSON
def creeTypeSanction = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_IPS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_INC_PUN_SAN)
String libelle = params.libelle
Map resultats
def modifieTypeSanction = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_IPS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_INC_PUN_SAN)
Long identifiant = Long.parseLong(params.id)
String libelle = params.libelle
Map resultats
}
def supprimeTypeSanction = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_IPS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_INC_PUN_SAN)
Long identifiant = Long.parseLong(params.id)
Map resultats
TypeSanction type = TypeSanction.get(identifiant)
//--------- Types de punition ------------------
def getTypesPunition = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_IPS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_INC_PUN_SAN)
List<Map> resultats = getAllTypesPunition()
render resultats as JSON
def creeTypePunition = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_IPS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_INC_PUN_SAN)
String libelle = params.libelle
Map resultats
def modifieTypePunition = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_IPS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_INC_PUN_SAN)
Long identifiant = Long.parseLong(params.id)
String libelle = params.libelle
Map resultats
def supprimeTypePunition = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_IPS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_INC_PUN_SAN)
Long identifiant = Long.parseLong(params.id)
Map resultats
TypePunition type = TypePunition.get(identifiant)
//--------- Qualités des protagonistes ---------
def getQualitesProtagoniste = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_IPS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_INC_PUN_SAN)
List<Map> resultats = getAllQualitesProtagoniste()
render resultats as JSON
}
def creeQualiteProtagoniste = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_IPS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_INC_PUN_SAN)
String libelle = params.libelle
Map resultats
PreferencesEtablissementAbsences pref = getPreferencesEtablissementCourant()
}
def modifieQualiteProtagoniste = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_IPS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_INC_PUN_SAN)
Long identifiant = Long.parseLong(params.id)
String libelle = params.libelle
Map resultats
def supprimeQualiteProtagoniste = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_IPS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_INC_PUN_SAN)
Long identifiant = Long.parseLong(params.id)
Map resultats
QualiteProtagoniste protagoniste = QualiteProtagoniste.get(identifiant)
//--------- Partenir à prévenir ----------------
def getPartenairesAPrevenir = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_IPS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_INC_PUN_SAN)
List<Map> resultats = getAllPartenairesAPrevenir()
render resultats as JSON
}
def creePartenaireAPrevenir = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_IPS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_INC_PUN_SAN)
String libelle = params.libelle
Map resultats
PreferencesEtablissementAbsences pref = getPreferencesEtablissementCourant()
}
def modifiePartenaireAPrevenir = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_IPS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_INC_PUN_SAN)
Long identifiant = Long.parseLong(params.id)
String libelle = params.libelle
Map resultats
def supprimePartenaireAPrevenir = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_IPS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_INC_PUN_SAN)
Long identifiant = Long.parseLong(params.id)
Map resultats
PartenaireAPrevenir partenaire = PartenaireAPrevenir.get(identifiant)
//--------- Lieux d'incident -------------------
def getLieuxIncident = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_IPS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_INC_PUN_SAN)
List<Map> resultats = getAllLieuxIncident()
render resultats as JSON
}
def creeLieuIncident = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_IPS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_INC_PUN_SAN)
String libelle = params.libelle
Map resultats
PreferencesEtablissementAbsences pref = getPreferencesEtablissementCourant()
}
def modifieLieuIncident = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_IPS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_INC_PUN_SAN)
Long identifiant = Long.parseLong(params.id)
String libelle = params.libelle
Map resultats
def supprimeLieuIncident = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_IPS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_INC_PUN_SAN)
Long identifiant = Long.parseLong(params.id)
Map resultats
LieuIncident lieu = LieuIncident.get(identifiant)
import grails.converters.JSON
import org.lilie.services.eliot.parametrages.motifs.MotifDeleteUtiliseException
import org.lilie.services.eliot.parametrages.motifs.GroupeMotifDeleteUtiliseException
-import org.lilie.services.eliot.absences.fonctionnalites.AbsencesFonctionnalite
import org.lilie.services.eliot.annuaire.SecuriteSession
import org.lilie.services.eliot.urllabel.breadcrumbs.BreadCrumbsItemInfo
import org.lilie.services.eliot.urllabel.UrlLabelInfo
+import org.lilie.services.eliot.absences.AbsencesFonctionnalite
@SuppressWarnings('ReturnNullFromCatchBlock')
class ParametrageMotifController extends AbstractAbsencesController {
def index = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_MOTIF)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_MOTIFS)
PreferencesEtablissementAbsences preferencesEtablissementAbsences = getPreferencesEtablissementCourant()
Long groupeARemplacer = Long.parseLong(params.aremplacerId)
Long groupeADeplacer = Long.parseLong(params.adeplacerId)
- PreferencesEtablissementAbsences preferencesEtablissementAbsences = getPreferencesEtablissementCourant()
+ PreferencesEtablissementAbsences preferencesEtablissementAbsences =
+ getPreferencesEtablissementCourant()
List<GroupeMotif> allGroupeMotifModifie = groupeMotifService.deplaceGroupeMotif(
GroupeMotif.get(groupeADeplacer),
* Action de création d'un groupe de motif
*/
def creerGroupeMotif = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_MOTIF)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_MOTIFS)
String libelle = params.libelle
log.debug("creerGroupeMotif:" + libelle)
SecuriteSession securiteSession = getSecuriteSession()
* Action de modification d'un groupe de motif
*/
def modifierGroupeMotif = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_MOTIF)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_MOTIFS)
SecuriteSession securiteSession = getSecuriteSession()
String libelle = params.libelle
* Action de suppression d'un groupe de motifs
*/
def supprimerGroupeMotif = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_MOTIF)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_MOTIFS)
SecuriteSession securiteSession = getSecuriteSession()
def monterGroupeMotif = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_MOTIF)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_MOTIFS)
+
+ PreferencesEtablissementAbsences preferencesEtablissementAbsences =
+ getPreferencesEtablissementCourant()
- PreferencesEtablissementAbsences preferencesEtablissementAbsences = getPreferencesEtablissementCourant()
Long id = Long.parseLong(params.id)
Map resultat
def descendreGroupeMotif = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_MOTIF)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_MOTIFS)
+
+ PreferencesEtablissementAbsences preferencesEtablissementAbsences =
+ getPreferencesEtablissementCourant()
- PreferencesEtablissementAbsences preferencesEtablissementAbsences = getPreferencesEtablissementCourant()
Long id = Long.parseLong(params.id)
Map resultat
* Action de création d'un motif
*/
def creerMotif = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_MOTIF)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_MOTIFS)
SecuriteSession securiteSession = getSecuriteSession()
String libelle = params.libelle
* Action de modification d'un motif
*/
def modifierMotif = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_MOTIF)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_MOTIFS)
SecuriteSession securiteSession = getSecuriteSession()
String libelle = params.libelle
* Action de suppression d'un motif
*/
def supprimerMotif = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.PARAMETRAGE_MOTIF)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PARAM_MOTIFS)
SecuriteSession securiteSession = getSecuriteSession()
Map resultat
import org.lilie.services.eliot.applications.absences.BasicCriteresRecherche
import org.lilie.services.eliot.impression.template.ImpressionTemplateDocumentService
import org.lilie.services.eliot.impression.TemplateDocument
-import org.lilie.services.eliot.absences.fonctionnalites.AbsencesFonctionnalite
import org.lilie.services.eliot.scolarite.personne.LocalPersonneService
import org.codehaus.groovy.grails.commons.ConfigurationHolder
import org.lilie.services.eliot.demon.DemandeTraitementStatut
import org.lilie.services.eliot.absences.publipostage.PublipostageDirectService
import org.lilie.services.eliot.absences.publipostage.PublipostageDiffereService
import org.lilie.services.eliot.impression.constantes.TemplateTypeFonctionnaliteEnum
+import org.lilie.services.eliot.absences.AbsencesFonctionnalite
class PublipostageController extends AbstractConsultationController {
CalendrierService calendrierService
ConfigurationHolder.config.eliot.impression.seuil
def index = {
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PUBLIPOSTAGE)
+
Map modele = prepareBaseModele(Page.PUBLIPOSTAGE_SELECTION)
Calendrier calendrier =
calendrierService.getCalendrierForEtablissement(
*/
def publiposteDirecte = {PublipostageCommand publipostageCommand ->
- verificationDroitFonctionnalite(AbsencesFonctionnalite.CONSULTATION_ABSENCES)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PUBLIPOSTAGE)
TemplateDocument templateDocument = impressionTemplateDocumentService.
findTemplateDocument(
@SuppressWarnings('CatchException')
def publiposteDiffere = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.CONSULTATION_ABSENCES)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PUBLIPOSTAGE)
Map resultats
try {
import org.codehaus.groovy.grails.commons.ConfigurationHolder
import org.lilie.services.eliot.urllabel.breadcrumbs.BreadCrumbsItemInfo
import org.lilie.services.eliot.urllabel.UrlLabelInfo
+import org.lilie.services.eliot.absences.AbsencesFonctionnalite
/**
* @author jbui
AbsencesDemandeTraitementService absencesDemandeTraitementService
def index = {
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PUBLIPOSTAGE)
+
Map modele = prepareBaseModele(Page.PUBLIPOSTAGE_SUIVI_IMPRESSION)
Calendrier calendrier =
import org.lilie.services.eliot.urllabel.UrlLabelInfo
import org.lilie.services.eliot.impression.constantes.TypeMedia
import org.lilie.services.eliot.sms.SmsStatut
+import org.lilie.services.eliot.absences.AbsencesFonctionnalite
/**
* Suivi du publipostage
* Page d'accueil
*/
def index = {
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PUBLIPOSTAGE)
Map modele = prepareBaseModele(Page.PUBLIPOSTAGE_SUIVI_PAR_ELEVE)
* Recherche
*/
def recherche = {
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_PUBLIPOSTAGE)
int start
Map sortInfo
import org.lilie.services.eliot.absences.AppelLigne
import org.lilie.services.eliot.temps.Time
-import org.lilie.services.eliot.absences.fonctionnalites.AbsencesFonctionnalite
import org.lilie.services.eliot.absences.saisie.absencejournee.AbsenceJourneeService
import org.lilie.services.eliot.temps.Agenda
import org.lilie.services.eliot.temps.TempsAgendaService
import org.lilie.services.eliot.absences.saisie.appel.AppelAvecLignesInfo
import org.lilie.services.eliot.absences.saisie.appel.AppelTemporaire
import org.lilie.services.eliot.absences.saisie.appel.AppelEleveMarshallerService
+import org.lilie.services.eliot.absences.AbsencesFonctionnalite
class SaisieController extends AbstractAbsencesController {
private static final String APPEL_TEMP = 'APPEL_TEMP' // appel temporaire
// sauvegarde dans la session avant sont enregistrement dans la base
+
+
+ def testDroits = {
+ HashSet results = droitsSessionService.getFonctionnalitesAccessibles(securiteSession, etablissementCourant())
+ render results as JSON
+ }
+
+
def indexCpe = {
// toimp charge l'appel depuis la sessison
- verificationDroitFonctionnalite(AbsencesFonctionnalite.SAISIE_ABSENCES_CPE)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_SAISIE_APPELS)
Map modele = prepareBaseModele(Page.SAISIE_ABSENCES_CPE)
PreferencesEtablissementAbsences prefEtab = getPreferencesEtablissementCourant()
def indexProf = {
// toimp charge l'appel depuis la session
- verificationDroitFonctionnalite(AbsencesFonctionnalite.SAISIE_ABSENCES_PROF)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_SAISIE_APPELS_EN_CLASSE)
// construction du modèle
Map modele = prepareBaseModele(Page.SAISIE_ABSENCES_PROF)
modele += getModeleSaisieAbsence(params)
def structureEnseignementId = params.structureEnseignementId
String idMotifSansMotif = motifService.getMotifSansMotif(prefEtab).id
- Calendrier calendrier = calendrierSessionService.
- getCalendrierForEtablissement(
- prefEtab.etablissement
- )
+ Calendrier calendrier =
+ calendrierSessionService.getCalendrierForEtablissement(prefEtab.etablissement)
Map anneeScolaire = [
debutAnneeScolaire: formateDate(calendrier.premierJour),
}
StructureEnseignement classe =
- StructureEnseignement.get(structureEnseignementId)
+ StructureEnseignement.get(structureEnseignementId)
List<PlageAppelInfo> lst = appelService.getGrilleHoraire(
getSecuriteSession(),
List<StructureEnseignement> structures = localStructureEnseignementService.
findAllStructureEnseignementByEnseignantAndEtablissement(
- getSecuriteSession().defaultAutorite,
- etablissementCourant()
- )
+ getSecuriteSession().defaultAutorite,
+ etablissementCourant()
+ )
List listeStructure = structures.collect {[id: it.id, code: it.code]}
return [
}
private def ajouteAppelTemporaire(
- List<PlageAppelInfo> lst,
- StructureEnseignement classe,
- Date jour) {
+ List<PlageAppelInfo> lst,
+ StructureEnseignement classe,
+ Date jour) {
AppelTemporaire appelTemporaire = chargeAppelDepuisSession()
@SuppressWarnings('CatchException')
def creeAppel = { CreationAppelCommand creationAppelCmd ->
- verificationDroitFonctionnalite(AbsencesFonctionnalite.SAISIE_ABSENCES)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_SAISIE)
Map result = (Map) [:]
try {
SimpleDateFormat sdf = new SimpleDateFormat(
Locale.FRANCE
)
- PreferencesEtablissementAbsences preferences =
- getPreferencesEtablissementCourant()
+ PreferencesEtablissementAbsences preferences =
+ getPreferencesEtablissementCourant()
AppelInfo appelACreer = new AppelInfo()
appelACreer.id = null
*/
@SuppressWarnings('CatchException')
def modifieAppel = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.SAISIE_ABSENCES)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_SAISIE)
Map result = (Map) [:]
List<AppelLigneCreationInfo> lstAppelLigneCreationInfo
try {
*/
@SuppressWarnings('CatchException')
def supprimeAppel = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.SAISIE_ABSENCES)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_SAISIE)
Map result = (Map) [:]
try {
String appelIdStr = params.appelId
@SuppressWarnings('CatchException')
def listeAppels = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.SAISIE_ABSENCES_CPE)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_SAISIE_APPELS)
Map result = (Map) [:]
SimpleDateFormat sdf = new SimpleDateFormat(
@SuppressWarnings('CatchException')
def litAppel = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.SAISIE_ABSENCES_CPE)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_SAISIE_APPELS)
Map result = (Map) [:]
try {
Long appelId = Long.parseLong(params.appelId)
}
def listeAppelsEleves = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.SAISIE_ABSENCES)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_SAISIE)
JSON.registerObjectMarshaller(Time) {
return it?.format(message(code: 'absences.format.heureHHMM'))
}
Date dateAppel = Date.parse('dd/MM/yyyy', params.date)
AbsenceJourneeInfo absenceJourneeInfo = absenceJourneeService.
findAbsencesJourneeForJourAndStructure(
- dateAppel,
- structureEnseignement
- )
+ dateAppel,
+ structureEnseignement
+ )
absenceJourneeInfo.absenceJourneeEleveInfos.addAll(
appelService.getAbsencesElevesSurAutresAppels(
// Récupère tous les agendas de l'enseignant
List<Agenda> agendasEnseignant =
- tempsAgendaService.findAllAgendaEnseignantByEnseignant(securiteSession)
+ tempsAgendaService.findAllAgendaEnseignantByEnseignant(securiteSession)
List<Evenement> evenements = []
// Récupère les événements dans tous les agendas pour la date choisie
package org.lilie.services.eliot.absences.saisie.collective
import org.lilie.services.eliot.absences.AbstractAbsencesController
-import org.lilie.services.eliot.absences.fonctionnalites.AbsencesFonctionnalite
import org.lilie.services.eliot.absences.page.Page
import org.lilie.services.eliot.scolarite.Calendrier
import grails.converters.JSON
import org.lilie.services.eliot.absences.saisie.hebdomadaire.CalendrierHebdo
import org.lilie.services.eliot.absences.saisie.hebdomadaire.CalendrierHebdoLigne
import org.lilie.services.eliot.absences.saisie.hebdomadaire.LigneCalendrierMarshallerService
+import org.lilie.services.eliot.absences.AbsencesFonctionnalite
/**
* @author jbui
LigneCalendrierMarshallerService ligneCalendrierMarshallerService
def index = {
- verificationDroitFonctionnalite(
- AbsencesFonctionnalite.SAISIE_COLLECTIVE
- )
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_SAISIE_ABS_RETARDS_DEPARTS)
Map modele = prepareBaseModele(Page.SAISIE_DISPENSES)
Calendrier calendrier = calendrierService.getCalendrierForEtablissement(etablissementCourant())
import org.lilie.services.eliot.absences.AbstractAbsencesController
import org.lilie.services.eliot.absences.page.Page
-import org.lilie.services.eliot.absences.fonctionnalites.AbsencesFonctionnalite
import org.lilie.services.eliot.scolarite.Calendrier
import grails.converters.JSON
import org.lilie.services.eliot.parametrages.calendrier.CalendrierService
import org.lilie.services.eliot.scolarite.Etablissement
import org.lilie.services.eliot.urllabel.breadcrumbs.BreadCrumbsItemInfo
import org.lilie.services.eliot.urllabel.UrlLabelInfo
+import org.lilie.services.eliot.absences.AbsencesFonctionnalite
/**
* @author ywan
DemiPensionInternatService demiPensionInternatService
def indexDemiPension = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.SAISIE_DEMI_PENSION)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_SAISIE_DEMI_PENSION_INTERNAT)
// construction du modèle
Map modele = prepareBaseModele(Page.SAISIE_DEMI_PENSION)
}
def indexInternat = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.SAISIE_INTERNAT)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_SAISIE_DEMI_PENSION_INTERNAT)
// construction du modèle
Map modele = prepareBaseModele(Page.SAISIE_INTERNAT)
import org.lilie.services.eliot.absences.saisie.discipline.incident.exceptions.IncidentException
import org.lilie.services.eliot.securite.AutorisationException
import org.codehaus.groovy.grails.web.json.JSONObject
-import org.lilie.services.eliot.absences.fonctionnalites.AbsencesFonctionnalite
import org.lilie.services.eliot.absences.saisie.discipline.sanction.exceptions.SanctionException
import org.lilie.services.eliot.absences.saisie.discipline.punition.exceptions.PunitionException
import org.lilie.services.eliot.export.DonneesPourExportCSV
import org.lilie.services.eliot.absences.EnumMarshallerService
import org.springframework.web.servlet.support.RequestContextUtils as RCU
import org.lilie.services.eliot.scolarite.Personne
+import org.lilie.services.eliot.absences.AbsencesFonctionnalite
/**
* @author bahj
* @author bahj
*/
def index = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.SAISIE_INCIDENTS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_SAISIE_INC_PUN_SAN)
// construction du modèle
Map modele = prepareBaseModele(Page.SAISIE_INCIDENTS)
modele.activeCRUD = aDroitsCUDDiscipline()
* Alimente la page de consultation des incidents
*/
def findIncidents = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.SAISIE_INCIDENTS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_SAISIE_INC_PUN_SAN)
def sortInfo = JSON.parse(params.sortInfo)
int start = params.start ? Integer.parseInt(params.start) : 0
int limit = params.limit ? Integer.parseInt(params.limit) : nbLigneParPage
}
def findIncidentsCSV = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.SAISIE_INCIDENTS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_SAISIE_INC_PUN_SAN)
DonneesPourExportCSV donneesPourExportCSV =
absencesPreparationExportCSVService.findIncidents(
* Affiche la page de création d'un nouvel incident
*/
def afficheCreation = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.SAISIE_INCIDENTS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_SAISIE_INC_PUN_SAN)
Boolean isAnnuler = null
if (params.isAnnuler) {
* Affiche l'incident en mode modification
*/
def afficheModification = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.SAISIE_INCIDENTS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_SAISIE_INC_PUN_SAN)
Map resultats = [:]
Long idIncident = Long.parseLong(params.id)
Boolean isModeModification = null
* @author bahj
*/
def enregistreIncident = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.SAISIE_INCIDENTS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_SAISIE_INC_PUN_SAN)
Map resultats = [:]
Map incidentInfo = JSON.parse(params.incidentInfo) as Map
String identifiant = incidentInfo.idIncident
* @return
*/
private creeIncident(IncidentParams incidentACreerParams) {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.SAISIE_INCIDENTS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_SAISIE_INC_PUN_SAN)
Map resultats = [:]
Incident incident = null
*/
private Map modifieIncident(IncidentParams incidentAModifierDto,
Long idIncident) {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.SAISIE_INCIDENTS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_SAISIE_INC_PUN_SAN)
Map resultats = [:]
Incident incident = Incident.get(idIncident)
def supprimeIncident = {
// Vérifie les droits d'accès à la page
- verificationDroitFonctionnalite(AbsencesFonctionnalite.SAISIE_INCIDENTS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_SAISIE_INC_PUN_SAN)
Incident incident = Incident.get(Long.parseLong(params.id))
Map resultats
import org.lilie.services.eliot.absences.page.Page
import org.lilie.services.eliot.absences.AbstractAbsencesController
import org.lilie.services.eliot.parametrages.calendrier.CalendrierService
-import org.lilie.services.eliot.absences.fonctionnalites.AbsencesFonctionnalite
import org.lilie.services.eliot.absences.saisie.discipline.incident.ProfilCenseur
import org.codehaus.groovy.grails.commons.ConfigurationHolder
import java.text.SimpleDateFormat
import org.lilie.services.eliot.urllabel.UrlLabelInfo
import org.lilie.services.eliot.absences.EnumMarshallerService
import org.springframework.web.servlet.support.RequestContextUtils as RCU
+import org.lilie.services.eliot.absences.AbsencesFonctionnalite
/**
* @author ywan
*/
def index = {
// Vérifie les drois d'accès à la page
- verificationDroitFonctionnalite(AbsencesFonctionnalite.SAISIE_PUNITIONS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_SAISIE_INC_PUN_SAN)
// construction du modèle
Map modele = prepareBaseModele(Page.SAISIE_PUNITIONS)
*/
def afficheCreation = {
// Vérifie les drois d'accès à la page
- verificationDroitFonctionnalite(AbsencesFonctionnalite.SAISIE_PUNITIONS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_SAISIE_INC_PUN_SAN)
Boolean isAnnuler = null
if (params.isAnnuler) {
def afficheModification = {
// Vérifie les drois d'accès à la page
- verificationDroitFonctionnalite(AbsencesFonctionnalite.SAISIE_PUNITIONS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_SAISIE_INC_PUN_SAN)
// construction du modèle
Map modele = prepareBaseModele(Page.SAISIE_PUNITIONS)
def supprimePunition = {
// Vérifie les droits d'accès à la page
- verificationDroitFonctionnalite(AbsencesFonctionnalite.SAISIE_PUNITIONS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_SAISIE_INC_PUN_SAN)
Map resultats = [:]
Punition punition = Punition.get(Long.parseLong(params.id))
import org.lilie.services.eliot.absences.AbstractAbsencesController
import org.lilie.services.eliot.absences.page.Page
import org.lilie.services.eliot.absences.PreferencesEtablissementAbsences
-import org.lilie.services.eliot.absences.fonctionnalites.AbsencesFonctionnalite
import org.lilie.services.eliot.scolarite.Calendrier
import grails.converters.JSON
import org.lilie.services.eliot.parametrages.calendrier.CalendrierService
import org.lilie.services.eliot.urllabel.UrlLabelInfo
import org.lilie.services.eliot.absences.EnumMarshallerService
import org.springframework.web.servlet.support.RequestContextUtils as RCU
+import org.lilie.services.eliot.absences.AbsencesFonctionnalite
/**
* @author bahj
def index = {
// Vérifie les drois d'accès à la page
- verificationDroitFonctionnalite(AbsencesFonctionnalite.SAISIE_SANCTIONS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_SAISIE_INC_PUN_SAN)
// construction du modèle
Map modele = prepareBaseModele(Page.SAISIE_SANCTIONS)
*/
def afficheCreation = {
// Vérifie les drois d'accès à la page
- verificationDroitFonctionnalite(AbsencesFonctionnalite.SAISIE_SANCTIONS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_SAISIE_INC_PUN_SAN)
Boolean isAnnuler = null
if (params.isAnnuler) {
def supprimeSanction = {
// Vérifie les droits d'accès à la page
- verificationDroitFonctionnalite(AbsencesFonctionnalite.SAISIE_SANCTIONS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_SAISIE_INC_PUN_SAN)
Map resultats = [:]
Sanction sanction = Sanction.get(Long.parseLong(params.id))
def afficheModification = {
// Vérifie les drois d'accès à la page
- verificationDroitFonctionnalite(AbsencesFonctionnalite.SAISIE_SANCTIONS)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_SAISIE_INC_PUN_SAN)
Long identifiant = Long.parseLong(params.id)
}
}
-// Bouchon pour yi
- def isEleveAbsent = {
- Map absenceInfo = (Map) JSON.parse(params.absenceInfo)
-// o autoriteEleveId : long
-// o dateDebut : string
-// o dateFin : string
-// o heureDebut : string
-// o heureFin : string
-
- Personne eleve = getPersonneForIdAutorite(absenceInfo.autoriteEleveId)
-
- Date dateDebut = Date.parse(message(code: 'absences.format.dateJJMMAAAA'), absenceInfo.dateDebut)
- Date dateFin = Date.parse(message(code: 'absences.format.dateJJMMAAAA'), absenceInfo.dateFin)
- Date heureDebut = Date.parse(message(code: 'absences.format.heureHHMM'), absenceInfo.heureDebut)
- Date heureFin = Date.parse(message(code: 'absences.format.heureHHMM'), absenceInfo.heureFin)
- Boolean eleveAbsent = consultationService.isEleveAbsentForPeriode(
- eleve,
- dateDebut,
- heureDebut,
- dateFin,
- heureFin
- )
-
- Map resultat = [
- success: true,
- isEleveAbsent: eleveAbsent
- ]
- if (eleveAbsent) {
- resultat.message = message(code: "absences.saisie.sanctions.creationModification.modification.absences.presentes")
- }
- render resultat as JSON
- }
/**
* Permet de modifier une sanction
package org.lilie.services.eliot.absences.saisie.dispense
import org.lilie.services.eliot.absences.AbstractAbsencesController
-import org.lilie.services.eliot.absences.fonctionnalites.AbsencesFonctionnalite
import org.lilie.services.eliot.absences.page.Page
import org.lilie.services.eliot.urllabel.UrlLabelInfo
-
import org.lilie.services.eliot.urllabel.breadcrumbs.BreadCrumbsItemInfo
import grails.converters.JSON
import org.lilie.services.eliot.temps.DateUtil
import org.lilie.services.eliot.scolarite.Personne
import org.lilie.services.eliot.scolarite.StructureEnseignement
-
import java.text.SimpleDateFormat
import org.lilie.services.eliot.scolarite.structureenseignement.LocalStructureEnseignementService
import org.lilie.services.eliot.scolarite.Matiere
import org.lilie.services.eliot.absences.PlageHoraire
import org.lilie.services.eliot.absences.saisie.dateadate.DatesMarshallerService
import org.lilie.services.eliot.absences.saisie.dateadate.SaisieDateADateLigneParams
+import org.lilie.services.eliot.absences.AbsencesFonctionnalite
/**
* @author jcok
def index = {
- verificationDroitFonctionnalite(
- AbsencesFonctionnalite.SAISIE_DISPENSES
- )
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_SAISIE_ABS_RETARDS_DEPARTS)
Map modele = prepareBaseModele(Page.SAISIE_DISPENSES)
Calendrier calendrier = calendrierService.getCalendrierForEtablissement(etablissementCourant())
import org.lilie.services.eliot.scolarite.Calendrier
import java.text.SimpleDateFormat
import org.lilie.services.eliot.scolarite.structureenseignement.LocalStructureEnseignementService
-import org.lilie.services.eliot.absences.fonctionnalites.AbsencesFonctionnalite
import org.lilie.services.eliot.temps.DateUtil
-
import org.lilie.services.eliot.scolarite.StructureEnseignement
import org.lilie.services.eliot.securite.impl.Autorite
import org.lilie.services.eliot.absences.saisie.absencejournee.AbsenceJourneeParams
import org.lilie.services.eliot.urllabel.breadcrumbs.BreadCrumbsItemInfo
import org.lilie.services.eliot.urllabel.UrlLabelInfo
import org.lilie.services.eliot.absences.PreferencesEtablissementAbsences
+import org.lilie.services.eliot.absences.AbsencesFonctionnalite
/**
* @author ywan
private final static String CLE_JOUR = 'jour'
def parClasse = {
- verificationDroitFonctionnalite(
- AbsencesFonctionnalite.SAISIE_HEBDOMADAIRE_PAR_CLASSE
- )
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_SAISIE_ABS_RETARDS_DEPARTS)
// construction du modèle
Map modele = prepareBaseModele(Page.SAISIE_HEBDOMADAIRE_PAR_CLASSE)
def parEleve = {
- verificationDroitFonctionnalite(
- AbsencesFonctionnalite.SAISIE_HEBDOMADAIRE_PAR_ELEVE
- )
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_SAISIE_ABS_RETARDS_DEPARTS)
// construction du modèle
Map modele = prepareBaseModele(Page.SAISIE_HEBDOMADAIRE_PAR_CLASSE)
import org.lilie.services.eliot.temps.DateUtil
import org.lilie.services.eliot.urllabel.UrlLabelInfo
import org.lilie.services.eliot.urllabel.breadcrumbs.BreadCrumbsItemInfo
-
import grails.converters.JSON
-import org.lilie.services.eliot.absences.fonctionnalites.AbsencesFonctionnalite
import org.lilie.services.eliot.absences.page.Page
import org.lilie.services.eliot.absences.statistiques.Type
-
import org.lilie.services.eliot.absences.statistiques.hebdomadaire.StatsHebdos
import org.lilie.services.eliot.absences.statistiques.hebdomadaire.StatsHebdosService
import org.lilie.services.eliot.absences.statistiques.mensuelle.ModeCalcul
import org.lilie.services.eliot.absences.statistiques.mensuelle.StatsMensuellesParams
import org.springframework.web.servlet.support.RequestContextUtils
-
import java.text.SimpleDateFormat
import org.lilie.services.eliot.absences.AbstractAbsencesController
import org.lilie.services.eliot.absences.statistiques.mensuelle.StatsMensuellesFiltresContenu
import org.lilie.services.eliot.absences.statistiques.StatsMarshallerService
import org.lilie.services.eliot.absences.statistiques.mensuelle.AbsencesStatsMensuellesService
+import org.lilie.services.eliot.absences.AbsencesFonctionnalite
class StatistiqueHebdomadaireController extends AbstractAbsencesController {
StatsMarshallerService statsMarshallerService
def index = {
- verificationDroitFonctionnalite(
- AbsencesFonctionnalite.STATISTIQUES_HEBDOMADAIRE
- )
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_STATS)
Map modele = prepareBaseModele(Page.STATISTIQUES_HEBDOMADAIRE)
import grails.converters.JSON
import org.lilie.services.eliot.absences.AbstractAbsencesController
import org.lilie.services.eliot.absences.export.AbsencesPreparationExportCSVService
-import org.lilie.services.eliot.absences.fonctionnalites.AbsencesFonctionnalite
+import org.lilie.services.eliot.absences.fonctionnalites.AbsencesFonctionnaliteAnc
import org.lilie.services.eliot.absences.page.Page
import org.lilie.services.eliot.absences.statistiques.Type
import org.lilie.services.eliot.annuaire.SecuriteSession
Map modele
AppelLigne.withTransaction {
verificationDroitFonctionnalite(
- AbsencesFonctionnalite.STATISTIQUES_TEMPS_REEL
+ AbsencesFonctionnalite.ABS_STATS
)
// construction du modèle
}
def exporteTempsReel = {
- verificationDroitFonctionnalite(AbsencesFonctionnalite.STATISTIQUES_TEMPS_REEL)
+ verificationDroitFonctionnalite(AbsencesFonctionnalite.ABS_STATS)
Map mapParams = (Map) JSON.parse(params.params)
StatsMensuellesParams statsMensuellesParams = parseParams(mapParams)
import org.lilie.services.eliot.scolarite.Etablissement
import org.lilie.services.eliot.annuaire.SecuriteSession
import org.lilie.services.eliot.scolarite.etablissement.PreferencesEtablissementAbsencesService
+import org.lilie.services.eliot.absences.securite.DroitsSessionService
@SuppressWarnings('GrailsStatelessService')
class PreferencesUtilisateurAbsencesSessionService {
import org.lilie.services.eliot.securite.Autorite
import org.lilie.services.eliot.applications.absences.BilanService
import org.lilie.services.eliot.applications.absences.BasicCriteresRecherche
-import org.lilie.services.eliot.absences.DroitsService
+import org.lilie.services.eliot.absences.securite.DroitsService
class AbstractConsultationService extends BilanService {
static transactional = true
AnneeScolaireService anneeScolaireService
- ImpressionSuiviEleveService impressionSuiviEleveService
- ImpressionRequetageAbsencesService impressionRequetageAbsencesService
- ImpressionMoteurService impressionMoteurService
ImpressionRequetageService impressionRequetageService
/**
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+
+
+
+
+
+
+
+
+package org.lilie.services.eliot.absences.fonctionnalites
+
+/**
+ * Décrit les fonctionnalités de l'application eliot-absences
+ *
+ * @author jtra
+ */
+public enum AbsencesFonctionnaliteAnc {
+ SAISIE_ABSENCES_CPE, // todo OK (ABS_SAISIE_APPELS)
+ SAISIE_ABSENCES_PROF, // todo OK (ABS_SAISIE_APPELS_EN_CLASSE)
+ SAISIE_ABSENCES, // TODO OK (ABS_SAISIE)//Saisie par un CPE ou un prof (accès aux méthodes communes)
+ SAISIE_HEBDOMADAIRE_PAR_CLASSE, // TODO OK (ABS_SAISIE_ABS_RETARDS_DEPARTS)
+ SAISIE_HEBDOMADAIRE_PAR_ELEVE, // TODO OK (ABS_SAISIE_ABS_RETARDS_DEPARTS)
+ SAISIE_COLLECTIVE, // TODO OK (ABS_SAISIE_ABS_RETARDS_DEPARTS)
+ SAISIE_DISPENSES, // TODO OK (ABS_SAISIE_ABS_RETARDS_DEPARTS)
+ SAISIE_INCIDENTS, // TODO (ABS_SAISIE_INC_PUN_SAN)
+ SAISIE_PUNITIONS, // TODO (ABS_SAISIE_INC_PUN_SAN)
+ SAISIE_SANCTIONS, // TODO (ABS_SAISIE_INC_PUN_SAN)
+ SAISIE_INTERNAT, // todo (ABS_SAISIE_DEMI_PENSION_INTERNAT)
+ SAISIE_DEMI_PENSION, // todo (ABS_SAISIE_DEMI_PENSION_INTERNAT)
+ STATISTIQUES_TEMPS_REEL, // todo (ABS_STATS)
+ STATISTIQUES_TABLEAU_DE_BORD, // todo (ABS_STATS)
+ STATISTIQUES_HEBDOMADAIRE, // todo (ABS_STATS)
+ PARAMETRAGE_MOTIF, // todo (ABS_PARAM_MOTIFS)
+ PARAMETRAGE_GENERAL, //todo (ABS_PARAM_GENERAUX)
+ PARAMETRAGE_IPS, // todo (ABS_PARAM_INC_PUN_SAN)
+ PARAMETRAGE_MODELEDOCUMENT, // todo (n'est pas utilisé !)
+ PUBLIPOSTAGE_SELECTION, // todo (ABS_PUBLIPOSTAGE)
+ PUBLIPOSTAGE_SUIVI_PAR_ELEVE, // todo (ABS_PUBLIPOSTAGE)
+ PUBLIPOSTAGE_SUIVI_IMPRESSION, // todo (ABS_PUBLIPOSTAGE)
+ CONSULTATION_ABSENCES,// todo (ABS_SAISIE_ABS_RETARDS_DEPARTS) //Consultation par un CPE ou un prof (accès aux méthodes communes)
+ CONSULTATION_ABSENCES_PARENT, // todo (ABS_CONSULT_PARENT) // Consultation par un parent
+ CONSULTATION_ABSENCES_ELEVE, // TODO ABS_CONSULT_ELEVE Consultation par un élève
+ CONSULTATION_ABSENCES_ENSEIGNANT, //TODO (ABS_CONSULT_ENSEIGNANT) Consultation par un enseignant
+ CONSULTATION_APPELS_OUBLIES, // TODO (ABS_CONSULT)
+ CONSULTATION_REGISTRE_MENSUEL, // TODO (ABS_CONSULT)
+ NOTIFICATION_PREFERNCE_UTILISATEUR // todO : VOIR COMMENT GÉRER
+}
\ No newline at end of file
package org.lilie.services.eliot.absences.menu
-import org.lilie.services.eliot.absences.fonctionnalites.AbsencesFonctionnalite
+import org.lilie.services.eliot.absences.fonctionnalites.AbsencesFonctionnaliteAnc
import org.lilie.services.eliot.absences.page.Page
import org.lilie.services.eliot.menu.EtablissementMenuItemInfo
import org.lilie.services.eliot.menu.MenuInfo
import org.lilie.services.eliot.menu.MenuItemInfo
import org.lilie.services.eliot.scolarite.Etablissement
import org.lilie.services.eliot.absences.page.GroupePage
-import org.lilie.services.eliot.absences.DroitsService
+import org.lilie.services.eliot.absences.securite.DroitsService
import org.lilie.services.eliot.annuaire.SecuriteSession
+import org.lilie.services.eliot.absences.AbsencesFonctionnalite
/**
* Permet d'obtenir les informations de construction du menu pour la session
}
private MenuItemInfo getMenuInfoPublipostage(HashSet fonctionnalitesAccessibles, Page pageCourante) {
- boolean menuPublipostageVisible =
- fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.PUBLIPOSTAGE_SELECTION) ||
- fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.PUBLIPOSTAGE_SUIVI_PAR_ELEVE) ||
- fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.PUBLIPOSTAGE_SUIVI_IMPRESSION)
- if (menuPublipostageVisible) {
+ if (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.ABS_PUBLIPOSTAGE)) {
MenuItemInfo publipostage = new MenuItemInfo(
codeLabel: 'absences.menu.publipostage.titrePrincipal',
menuType: MENU_ITEM,
)
// Sélection
- if (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.PUBLIPOSTAGE_SELECTION)) {
+ if (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.ABS_PUBLIPOSTAGE)) {
publipostage.items << new MenuItemInfo(
codeLabel: 'absences.menu.publipostage.selection.titrePrincipal',
controleur: Page.PUBLIPOSTAGE_SELECTION.controllerName,
}
// Suivi des impressions
- if (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.PUBLIPOSTAGE_SUIVI_IMPRESSION)) {
+ if (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.ABS_PUBLIPOSTAGE)) {
publipostage.items << new MenuItemInfo(
codeLabel: 'absences.menu.publipostage.suiviImpression.titrePrincipal',
controleur: Page.PUBLIPOSTAGE_SUIVI_IMPRESSION.controllerName,
}
// Suivi par élève
- if (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.PUBLIPOSTAGE_SUIVI_PAR_ELEVE)) {
+ if (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.ABS_PUBLIPOSTAGE)) {
publipostage.items << new MenuItemInfo(
codeLabel: 'absences.menu.publipostage.suiviParEleve.titrePrincipal',
controleur: Page.PUBLIPOSTAGE_SUIVI_PAR_ELEVE.controllerName,
private MenuItemInfo getMenuInfoParametrage(HashSet fonctionnalitesAccessibles, Page pageCourante) {
boolean menuParametrageVisible = (
- (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.PARAMETRAGE_MOTIF)) ||
- (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.PARAMETRAGE_IPS))
+ (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.ABS_PARAM_MOTIFS)) ||
+ (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.ABS_PARAM_INC_PUN_SAN))
)
if (menuParametrageVisible) {
)
// Paramétrage - Générals
- if (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.PARAMETRAGE_GENERAL)) {
+ if (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.ABS_PARAM_GENERAUX)) {
parametrage.items << new MenuItemInfo(
codeLabel: 'absences.menu.parametrages.general.titrePrincipal',
controleur: Page.PARAMETRAGE_GENERAL.controllerName,
}
// Paramétrage - Motifs
- if (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.PARAMETRAGE_MOTIF)) {
+ if (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.ABS_PARAM_MOTIFS)) {
parametrage.items << new MenuItemInfo(
codeLabel: 'absences.menu.parametrages.motif.titrePrincipal',
controleur: Page.PARAMETRAGE_MOTIFS.controllerName,
}
// Paramétrage - Incident, punition et sanction
- if (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.PARAMETRAGE_IPS)) {
+ if (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.ABS_PARAM_INC_PUN_SAN)) {
parametrage.items << new MenuItemInfo(
codeLabel: 'absences.menu.parametrages.incidentPunitionSanction.titrePrincipal',
controleur: Page.PARAMETRAGES_IPS.controllerName,
private MenuItemInfo getMenuInfoStatistiques(Page pageCourante, HashSet fonctionnalitesAccessibles) {
boolean menuStatistiquesVisible =
(fonctionnalitesAccessibles.contains(
- AbsencesFonctionnalite.STATISTIQUES_TEMPS_REEL
+ AbsencesFonctionnalite.ABS_STATS
)) || (fonctionnalitesAccessibles.contains(
- AbsencesFonctionnalite.STATISTIQUES_TABLEAU_DE_BORD
+ AbsencesFonctionnalite.ABS_STATS
)) || (fonctionnalitesAccessibles.contains(
- AbsencesFonctionnalite.STATISTIQUES_HEBDOMADAIRE
+ AbsencesFonctionnalite.ABS_STATS
))
if (menuStatistiquesVisible) {
)
// Tableau de bord
- if (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.STATISTIQUES_TABLEAU_DE_BORD)) {
+ if (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.ABS_STATS)) {
statistiques.items << new MenuItemInfo(
codeLabel: 'absences.menu.statistiques.tableauDeBord.titrePrincipal',
controleur: Page.STATISTIQUES_TABLEAU_DE_BORD.controllerName,
}
// Temps réel
- if (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.STATISTIQUES_TEMPS_REEL)) {
+ if (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.ABS_STATS)) {
statistiques.items << new MenuItemInfo(
codeLabel: 'absences.menu.statistiques.tempsReel.titrePrincipal',
controleur: Page.STATISTIQUE_TEMPS_REEL.controllerName,
}
// Statistiques hebdomadaires
- if (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.STATISTIQUES_HEBDOMADAIRE)) {
+ if (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.ABS_STATS)) {
statistiques.items << new MenuItemInfo(
codeLabel: 'absences.menu.statistiques.hebdomadaire.titrePrincipal',
controleur: Page.STATISTIQUES_HEBDOMADAIRE.controllerName,
private MenuItemInfo getMenuInfoConsultation(Page pageCourante, HashSet fonctionnalitesAccessibles) {
if (
- fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.CONSULTATION_ABSENCES) ||
- fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.CONSULTATION_ABSENCES_PARENT) ||
- fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.CONSULTATION_ABSENCES_ELEVE) ||
- fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.CONSULTATION_ABSENCES_ENSEIGNANT) ||
- fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.CONSULTATION_APPELS_OUBLIES) ||
- fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.CONSULTATION_REGISTRE_MENSUEL)
+ fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.ABS_CONSULT)
) {
MenuItemInfo menuConsultation = new MenuItemInfo(
codeLabel: 'absences.menu.consultation.titrePrincipal',
selectionne: (pageCourante?.groupePage == GroupePage.CONSULTATION)
)
- if (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.CONSULTATION_ABSENCES)) {
+ if (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.ABS_CONSULT)) {
// Consultation multicritères
menuConsultation.items << getMenuConsultationMulticritere(pageCourante)
menuConsultation.items << getMenuConsultationInternat(pageCourante)
}
- if (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.CONSULTATION_APPELS_OUBLIES)) {
+ if (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.ABS_CONSULT)) {
menuConsultation.items << getMenuConsultationAppelsOublies(pageCourante)
}
- if (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.CONSULTATION_REGISTRE_MENSUEL)) {
+ if (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.ABS_CONSULT)) {
menuConsultation.items << getMenuConsultationRegistreMensuel(pageCourante)
}
- if (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.CONSULTATION_ABSENCES_PARENT)) {
+ if (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.ABS_CONSULT_PARENT)) {
// Consultation par parent
menuConsultation.items << getMenuConsultationParParent(pageCourante)
}
// Consultation par élève
- if (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.CONSULTATION_ABSENCES_ELEVE)) {
+ if (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.ABS_CONSULT_ELEVE)) {
menuConsultation.items << getMenuConsultationParEleve(pageCourante)
}
// Consultation par enseignant
- if (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.CONSULTATION_ABSENCES_ENSEIGNANT)) {
+ if (fonctionnalitesAccessibles.contains(AbsencesFonctionnalite.ABS_CONSULT_ENSEIGNANT)) {
menuConsultation.items << getMenuConsultationParEnseignant(pageCourante)
}
private MenuItemInfo getMenuInfoSaisie(HashSet fonctionnalitesAccessibles, Page pageCourante) {
if (fonctionnalitesAccessibles.contains(
- AbsencesFonctionnalite.SAISIE_ABSENCES_CPE) ||
+ AbsencesFonctionnalite.ABS_SAISIE_APPELS) ||
fonctionnalitesAccessibles.contains(
- AbsencesFonctionnalite.SAISIE_ABSENCES_PROF) ||
+ AbsencesFonctionnalite.ABS_SAISIE_APPELS_EN_CLASSE) ||
fonctionnalitesAccessibles.contains(
- AbsencesFonctionnalite.SAISIE_INCIDENTS) ||
+ AbsencesFonctionnalite.ABS_SAISIE_INC_PUN_SAN) ||
fonctionnalitesAccessibles.contains(
- AbsencesFonctionnalite.SAISIE_PUNITIONS) ||
+ AbsencesFonctionnalite.ABS_SAISIE_INC_PUN_SAN) ||
fonctionnalitesAccessibles.contains(
- AbsencesFonctionnalite.SAISIE_SANCTIONS) ||
+ AbsencesFonctionnalite.ABS_SAISIE_INC_PUN_SAN) ||
fonctionnalitesAccessibles.contains(
- AbsencesFonctionnalite.SAISIE_HEBDOMADAIRE_PAR_CLASSE) ||
+ AbsencesFonctionnalite.ABS_SAISIE_ABS_RETARDS_DEPARTS) ||
fonctionnalitesAccessibles.contains(
- AbsencesFonctionnalite.SAISIE_HEBDOMADAIRE_PAR_ELEVE) ||
+ AbsencesFonctionnalite.ABS_SAISIE_ABS_RETARDS_DEPARTS) ||
fonctionnalitesAccessibles.contains(
- AbsencesFonctionnalite.SAISIE_DISPENSES) ||
+ AbsencesFonctionnalite.ABS_SAISIE_ABS_RETARDS_DEPARTS) ||
fonctionnalitesAccessibles.contains(
- AbsencesFonctionnalite.SAISIE_COLLECTIVE) ||
+ AbsencesFonctionnalite.ABS_SAISIE_ABS_RETARDS_DEPARTS) ||
fonctionnalitesAccessibles.contains(
- AbsencesFonctionnalite.SAISIE_INTERNAT) ||
+ AbsencesFonctionnalite.ABS_SAISIE_DEMI_PENSION_INTERNAT) ||
fonctionnalitesAccessibles.contains(
- AbsencesFonctionnalite.SAISIE_DEMI_PENSION)
+ AbsencesFonctionnalite.ABS_SAISIE_DEMI_PENSION_INTERNAT)
) {
return creeMenuSaisie(pageCourante, fonctionnalitesAccessibles)
} else {
)
if (fonctionnalitesAccessibles.contains(
- AbsencesFonctionnalite.SAISIE_ABSENCES_CPE
+ AbsencesFonctionnalite.ABS_SAISIE_APPELS
)) {
// Saisie des absences par CPE /Directeur
menuSaisie.items << getMenuSaisieCPE(pageCourante)
}
if (fonctionnalitesAccessibles.contains(
- AbsencesFonctionnalite.SAISIE_ABSENCES_PROF
+ AbsencesFonctionnalite.ABS_SAISIE_APPELS_EN_CLASSE
)) {
// Saisie des absences par prof
menuSaisie.items << getMenuSaisieProf(pageCourante)
}
if (fonctionnalitesAccessibles.contains(
- AbsencesFonctionnalite.SAISIE_HEBDOMADAIRE_PAR_CLASSE
+ AbsencesFonctionnalite.ABS_SAISIE_ABS_RETARDS_DEPARTS
)) {
// Saisie absences hebdomadaires
}
if (fonctionnalitesAccessibles.contains(
- AbsencesFonctionnalite.SAISIE_HEBDOMADAIRE_PAR_ELEVE
+ AbsencesFonctionnalite.ABS_SAISIE_ABS_RETARDS_DEPARTS
)) {
// Saisie absences hebdomadaires
}
if (fonctionnalitesAccessibles.contains(
- AbsencesFonctionnalite.SAISIE_COLLECTIVE
+ AbsencesFonctionnalite.ABS_SAISIE_ABS_RETARDS_DEPARTS
)) {
// Saisie collective
}
if (fonctionnalitesAccessibles.contains(
- AbsencesFonctionnalite.SAISIE_DISPENSES
+ AbsencesFonctionnaliteAnc.SAISIE_DISPENSES
)) {
// Saisie dispenses
}
if (fonctionnalitesAccessibles.contains(
- AbsencesFonctionnalite.SAISIE_DEMI_PENSION
+ AbsencesFonctionnalite.ABS_SAISIE_DEMI_PENSION_INTERNAT
)) {
// Saisie des demi-pensions
}
if (fonctionnalitesAccessibles.contains(
- AbsencesFonctionnalite.SAISIE_INTERNAT
+ AbsencesFonctionnaliteAnc.SAISIE_INTERNAT
)) {
// Saisie internat
}
if (fonctionnalitesAccessibles.contains(
- AbsencesFonctionnalite.SAISIE_INCIDENTS
+ AbsencesFonctionnalite.ABS_SAISIE_INC_PUN_SAN
)) {
// Consultation/saisie des incidents
menuSaisie.items << getMenuSaisieIncident(pageCourante)
}
if (fonctionnalitesAccessibles.contains(
- AbsencesFonctionnalite.SAISIE_PUNITIONS
+ AbsencesFonctionnalite.ABS_SAISIE_INC_PUN_SAN
)) {
// Consultation/saisie des punitions
}
if (fonctionnalitesAccessibles.contains(
- AbsencesFonctionnalite.SAISIE_SANCTIONS
+ AbsencesFonctionnalite.ABS_SAISIE_INC_PUN_SAN
)) {
// Consultation/saisie des sanctions
package org.lilie.services.eliot.absences.parametrage.general
import org.lilie.services.eliot.absences.PreferencesEtablissementAbsences
-import org.lilie.services.eliot.absences.DroitsService
+import org.lilie.services.eliot.absences.securite.DroitsService
import org.lilie.services.eliot.annuaire.SecuriteSession
import org.lilie.services.eliot.absences.TauxAbsencesCalculMode
import org.lilie.services.eliot.absences.PreferencesEtablissementAbsences
import org.lilie.services.eliot.absences.parametrage.incidentpunitionsanction.exceptions.CreationContraintException
import org.lilie.services.eliot.absences.parametrage.incidentpunitionsanction.exceptions.LibelleLongException
-import org.lilie.services.eliot.absences.DroitsService
+import org.lilie.services.eliot.absences.securite.DroitsService
import org.lilie.services.eliot.securite.AutorisationException
import org.springframework.dao.DataIntegrityViolationException
import org.lilie.services.eliot.absences.parametrage.incidentpunitionsanction.exceptions.SuppressionContraintException
package org.lilie.services.eliot.absences.parametrage.incidentpunitionsanction
-import org.lilie.services.eliot.absences.DroitsService
+import org.lilie.services.eliot.absences.securite.DroitsService
import org.lilie.services.eliot.absences.PreferencesEtablissementAbsences
import org.lilie.services.eliot.absences.parametrage.incidentpunitionsanction.exceptions.CreationContraintException
import org.lilie.services.eliot.absences.parametrage.incidentpunitionsanction.exceptions.LibelleLongException
package org.lilie.services.eliot.absences.parametrage.incidentpunitionsanction
-import org.lilie.services.eliot.absences.DroitsService
+import org.lilie.services.eliot.absences.securite.DroitsService
import org.lilie.services.eliot.absences.PreferencesEtablissementAbsences
import org.lilie.services.eliot.absences.parametrage.incidentpunitionsanction.exceptions.CreationContraintException
import org.lilie.services.eliot.absences.parametrage.incidentpunitionsanction.exceptions.LibelleLongException
package org.lilie.services.eliot.absences.parametrage.incidentpunitionsanction
-import org.lilie.services.eliot.absences.DroitsService
+import org.lilie.services.eliot.absences.securite.DroitsService
import org.lilie.services.eliot.absences.PreferencesEtablissementAbsences
import org.lilie.services.eliot.absences.parametrage.incidentpunitionsanction.exceptions.CreationContraintException
import org.lilie.services.eliot.absences.parametrage.incidentpunitionsanction.exceptions.LibelleLongException
package org.lilie.services.eliot.absences.parametrage.incidentpunitionsanction
-import org.lilie.services.eliot.absences.DroitsService
+import org.lilie.services.eliot.absences.securite.DroitsService
import org.lilie.services.eliot.absences.PreferencesEtablissementAbsences
import org.lilie.services.eliot.absences.parametrage.incidentpunitionsanction.exceptions.CreationContraintException
import org.lilie.services.eliot.absences.parametrage.incidentpunitionsanction.exceptions.LibelleLongException
package org.lilie.services.eliot.absences.parametrage.incidentpunitionsanction
-import org.lilie.services.eliot.absences.DroitsService
+import org.lilie.services.eliot.absences.securite.DroitsService
import org.lilie.services.eliot.absences.PreferencesEtablissementAbsences
import org.lilie.services.eliot.absences.parametrage.incidentpunitionsanction.exceptions.CreationContraintException
import org.lilie.services.eliot.absences.parametrage.incidentpunitionsanction.exceptions.LibelleLongException
import org.lilie.services.eliot.absences.AbsenceJournee
-import org.lilie.services.eliot.absences.DroitsService
+import org.lilie.services.eliot.absences.securite.DroitsService
import org.lilie.services.eliot.absences.AbsencesDateUtil
import org.springframework.dao.DataIntegrityViolationException
import org.lilie.services.eliot.absences.AppelLigne
import org.lilie.services.eliot.annuaire.FonctionEnum
import org.lilie.services.eliot.securite.impl.DefaultSecuriteSessionFactory
import org.lilie.services.eliot.AutoriteTypeEliot
-import org.lilie.services.eliot.absences.DroitsService
+import org.lilie.services.eliot.absences.securite.DroitsService
import org.lilie.services.eliot.parametrages.calendrier.PlageHoraireService
import org.lilie.services.eliot.scolarite.personne.eleve.EleveAnnuaireService
import org.lilie.services.eliot.LocalAutoriteService
import org.lilie.services.eliot.securite.impl.Autorite
import org.lilie.services.eliot.absences.AppelLigne
import java.text.SimpleDateFormat
-import org.lilie.services.eliot.absences.DroitsService
+import org.lilie.services.eliot.absences.securite.DroitsService
import org.lilie.services.eliot.scolarite.structureenseignement.LocalStructureEnseignementService
import org.lilie.services.eliot.scolarite.Etablissement
import org.lilie.services.eliot.temps.Time
package org.lilie.services.eliot.absences.saisie.demipensioninternat
import org.lilie.services.eliot.absences.AppelLigne
-import org.lilie.services.eliot.absences.DroitsService
+import org.lilie.services.eliot.absences.securite.DroitsService
import org.lilie.services.eliot.annuaire.SecuriteSession
import org.lilie.services.eliot.securite.AutorisationException
import org.lilie.services.eliot.absences.AbsenceJournee
import org.lilie.services.eliot.absences.Incident
import org.lilie.services.eliot.securite.AutorisationException
-import org.lilie.services.eliot.absences.DroitsService
+import org.lilie.services.eliot.absences.securite.DroitsService
import org.lilie.services.eliot.absences.ProtagonisteIncident
import org.lilie.services.eliot.absences.PartenaireAPrevenirIncident
import org.springframework.dao.DataIntegrityViolationException
// personne est seulement prof/docu
// si elle a une autre fonctionne qui est plus forte, elle gagne
Boolean personneIsEnseignant =
- securiteSession.hasFonctionIn([
- FonctionEnum.ENSEIGNANT,
- FonctionEnum.DOCUMENTALISTE
- ], etablissement.id) &&
- !securiteSession.hasFonctionIn([
- FonctionEnum.DIRECTION,
- FonctionEnum.EDUCATION,
- FonctionEnum.ADMIN_LOCAL,
- FonctionEnum.CHEF_TRAVAUX,
- FonctionEnum.CORRESPONDANT_DEPLOIEMENT
- ], etablissement.id)
+ droitsService.isEnseignantOnlyDroitsIncPunSan(securiteSession, etablissement)
List<Autorite> eleves = []
if (personneIsEnseignant) {
package org.lilie.services.eliot.absences.saisie.discipline.punition
import org.lilie.services.eliot.absences.Punition
-import org.lilie.services.eliot.absences.DroitsService
+import org.lilie.services.eliot.absences.securite.DroitsService
import org.lilie.services.eliot.absences.saisie.discipline.punition.exceptions.PunitionException
import org.lilie.services.eliot.absences.saisie.discipline.punition.exceptions.PunitionDescriptionLongueException
import org.lilie.services.eliot.securite.AutorisationException
'punitionsInfo': []
]
- boolean personneIsEnseignant = isPersonneEnseignantOuDocumentaliste(
- securiteSession,
- etablissement
- )
+ boolean personneIsEnseignant =
+ droitsService.isEnseignantOnlyDroitsIncPunSan(securiteSession, etablissement)
List<Personne> eleves = []
if (personneIsEnseignant) {
'punitionsInfo': []
]
- boolean personneIsEnseignant = isPersonneEnseignantOuDocumentaliste(
- securiteSession,
- etablissement
- )
+ boolean personneIsEnseignant =
+ droitsService.isEnseignantOnlyDroitsIncPunSan(securiteSession, etablissement)
List<Personne> eleves = []
if (personneIsEnseignant) {
return result
}
- /**
- * Permet de savoir si une personne est prof ou documentaliste, (si la personne
- * a une autre fonction, celle-ci sera plus forte)
- * @param securiteSession
- * @param etablissement
- * @return personneIsEnseignant , si la personne est prof ou documentaliste
- */
- private boolean isPersonneEnseignantOuDocumentaliste(SecuriteSession securiteSession, Etablissement etablissement) {
-// personne est seulement prof/docu
- // si elle a une autre fonctionne qui est plus forte, elle gagne
- Boolean personneIsEnseignant =
- securiteSession.hasFonctionIn([
- FonctionEnum.ENSEIGNANT,
- FonctionEnum.DOCUMENTALISTE
- ], etablissement.id) &&
- !securiteSession.hasFonctionIn([
- FonctionEnum.DIRECTION,
- FonctionEnum.EDUCATION,
- FonctionEnum.ADMIN_LOCAL,
- FonctionEnum.CHEF_TRAVAUX,
- FonctionEnum.CORRESPONDANT_DEPLOIEMENT
- ], etablissement.id)
- return personneIsEnseignant
- }
-
private String findPunitionHqlFromPunition() {
String hqlFromPunition = """
select punition, pps.proprietesScolarite.structureEnseignement
import org.lilie.services.eliot.absences.Sanction
import org.lilie.services.eliot.absences.saisie.discipline.sanction.exceptions.SanctionException
-import org.lilie.services.eliot.absences.DroitsService
+import org.lilie.services.eliot.absences.securite.DroitsService
import org.lilie.services.eliot.securite.AutorisationException
import org.lilie.services.eliot.absences.saisie.discipline.sanction.exceptions.SanctionDescriptionLongueException
import org.springframework.dao.DataIntegrityViolationException
// personne est seulement prof/docu
// si elle a une autre fonctionne qui est plus forte, elle gagne
Boolean personneIsEnseignant =
- securiteSession.hasFonctionIn(
- [
- FonctionEnum.ENSEIGNANT,
- FonctionEnum.DOCUMENTALISTE
- ],
- etablissement.id
- ) &&
- !securiteSession.hasFonctionIn(
- [
- FonctionEnum.DIRECTION,
- FonctionEnum.EDUCATION,
- FonctionEnum.ADMIN_LOCAL,
- FonctionEnum.CHEF_TRAVAUX,
- FonctionEnum.CORRESPONDANT_DEPLOIEMENT
- ],
- etablissement.id
- )
+ droitsService.isEnseignantOnlyDroitsIncPunSan(securiteSession, etablissement)
List sanctionsInfo = []
* <http://www.cecill.info/licences.fr.html>.
*/
-package org.lilie.services.eliot.absences
+package org.lilie.services.eliot.absences.securite
import org.lilie.services.eliot.securite.AutorisationException
-import org.lilie.services.eliot.annuaire.Acteur
+
import org.lilie.services.eliot.scolarite.Etablissement
-import org.lilie.services.eliot.absences.fonctionnalites.AbsencesFonctionnalite
+
import org.lilie.services.eliot.droits.EliotDroitsService
-import org.lilie.services.eliot.fonctionnalites.EliotFonctionnalite
+
import org.lilie.services.eliot.annuaire.SecuriteSession
import org.lilie.services.eliot.annuaire.FonctionEnum
import org.lilie.services.eliot.securite.impl.Autorite
import org.lilie.services.eliot.scolarite.StructureEnseignement
import org.lilie.services.eliot.scolarite.etablissement.PreferencesEtablissementAbsencesService
import org.lilie.services.eliot.scolarite.personne.enseignant.EnseignantAnnuaireService
-import org.codehaus.groovy.grails.commons.ConfigurationHolder
+
+import org.lilie.services.eliot.absences.PreferencesEtablissementAbsences
+
+import org.lilie.services.eliot.absences.Appel
+import org.lilie.services.eliot.absences.AppelLigne
+
+import org.lilie.services.eliot.absences.AbsencesFonctionnalite
+import org.lilie.services.eliot.scolarite.ScolariteFonctionnalites
/**
* @author jbui
class DroitsService extends EliotDroitsService {
static transactional = true
- //Fonctionnalités accessibles aux CPE, Admi local, chef de travaux et directeurs
- private static final FN_CPE_AL_CT_DIR = [
- AbsencesFonctionnalite.SAISIE_ABSENCES_CPE,
- AbsencesFonctionnalite.SAISIE_HEBDOMADAIRE_PAR_CLASSE,
- AbsencesFonctionnalite.SAISIE_DISPENSES,
- AbsencesFonctionnalite.SAISIE_COLLECTIVE,
- AbsencesFonctionnalite.SAISIE_HEBDOMADAIRE_PAR_ELEVE,
- AbsencesFonctionnalite.CONSULTATION_ABSENCES,
- AbsencesFonctionnalite.PARAMETRAGE_MOTIF,
- AbsencesFonctionnalite.PARAMETRAGE_IPS,
- AbsencesFonctionnalite.STATISTIQUES_TEMPS_REEL,
- AbsencesFonctionnalite.STATISTIQUES_TABLEAU_DE_BORD,
- AbsencesFonctionnalite.STATISTIQUES_HEBDOMADAIRE,
- AbsencesFonctionnalite.PUBLIPOSTAGE_SELECTION,
- AbsencesFonctionnalite.PUBLIPOSTAGE_SUIVI_PAR_ELEVE,
- AbsencesFonctionnalite.PUBLIPOSTAGE_SUIVI_IMPRESSION,
- AbsencesFonctionnalite.SAISIE_DEMI_PENSION,
- AbsencesFonctionnalite.SAISIE_INTERNAT,
- AbsencesFonctionnalite.CONSULTATION_APPELS_OUBLIES,
- AbsencesFonctionnalite.CONSULTATION_REGISTRE_MENSUEL
- ]
-
- //Fonctionnalités accessibles aux CPE, directeurs, enseignants, admin local, chef de travaus et documentaliste
- private static final FN_AL_CT_DIR_ENS_DOC = [
- AbsencesFonctionnalite.SAISIE_INCIDENTS,
- AbsencesFonctionnalite.SAISIE_PUNITIONS,
- AbsencesFonctionnalite.SAISIE_SANCTIONS,
- AbsencesFonctionnalite.SAISIE_ABSENCES
- ]
-
- //Fonctionnalités accessibles aux enseignants et aux documentatlistes
- private static final FN_ENS_DOC = [
- AbsencesFonctionnalite.SAISIE_ABSENCES_PROF,
- AbsencesFonctionnalite.CONSULTATION_ABSENCES_ENSEIGNANT
- ]
-
- //Fonctionnalites accessibles aux directeurs, admin locaux et chef de travaux
- private static final FN_AL_CT_DIR = [
- AbsencesFonctionnalite.PARAMETRAGE_GENERAL
- ]
-
- //Fonctionnalites accessibles aux parents
- private static final FN_RESP = [
- AbsencesFonctionnalite.CONSULTATION_ABSENCES_PARENT
- ]
-
- //Fonctionnalites accessibles aux élèves
- private static final FN_EL = [
- AbsencesFonctionnalite.CONSULTATION_ABSENCES_ELEVE
- ]
-
- private static final FN_CPE_AL_CT_DIR_ENS_RESP_EL = [
- AbsencesFonctionnalite.NOTIFICATION_PREFERNCE_UTILISATEUR
- ]
-
PreferencesEtablissementAbsencesService preferencesEtablissementAbsencesService
EnseignantAnnuaireService enseignantAnnuaireService
- public Boolean getDroitFonctionnalite(SecuriteSession securiteSession,
- Etablissement etablissement,
- AbsencesFonctionnalite fonctionnalite) {
+ public HashSet getFonctionnalitesAccessibles(SecuriteSession securiteSession,
+ Etablissement etablissement) {
// Gestion des utilisateurs à accès restreint
if (securiteSession.defaultAutorite.aUnAccesRetreint()) {
- return false
+ return []
}
- Boolean droitAcquis = false
-
- if (FN_CPE_AL_CT_DIR.contains(fonctionnalite)) {
- if (securiteSession.hasFonctionIn(
- [
- FonctionEnum.EDUCATION,
- FonctionEnum.DIRECTION,
- FonctionEnum.ADMIN_LOCAL,
- FonctionEnum.CHEF_TRAVAUX,
- FonctionEnum.CORRESPONDANT_DEPLOIEMENT
- ],
- etablissement.id
- )) {
- droitAcquis = true
- }
- }
+ // Fonctionnalités paramétrables / fonctions paramétrables
+ HashSet fonctionnalitesAccessibles = securiteSession.allFonctionnalite(etablissement.id)
- if (FN_AL_CT_DIR_ENS_DOC.contains(fonctionnalite)) {
- if(securiteSession.hasFonctionIn(
- [
- FonctionEnum.EDUCATION,
- FonctionEnum.DIRECTION,
- FonctionEnum.ADMIN_LOCAL,
- FonctionEnum.CHEF_TRAVAUX,
- FonctionEnum.CORRESPONDANT_DEPLOIEMENT,
- FonctionEnum.ENSEIGNANT,
- FonctionEnum.DOCUMENTALISTE
- ],
- etablissement.id
- )){
- droitAcquis = true
- }
+ // Fonction directeur non paramétrable / fonctionnalité parametrable + non paramétrables
+ if (securiteSession.hasFonctionIn([FonctionEnum.DIRECTION], etablissement.id)) {
+ fonctionnalitesAccessibles.addAll(getDirecteurFonctionnalites())
}
- if (FN_ENS_DOC.contains(fonctionnalite)) {
- if(securiteSession.hasFonctionIn(
- [
- FonctionEnum.ENSEIGNANT,
- FonctionEnum.DOCUMENTALISTE
- ],
- etablissement.id
- )){
- droitAcquis = true
- }
+ // Fonction Parent non paramétrable / fonctionnalité parametrable + non paramétrables
+ if (securiteSession.hasFonctionIn([FonctionEnum.PERS_REL_ELEVE], etablissement.id)) {
+ fonctionnalitesAccessibles.add(AbsencesFonctionnalite.ABS_CONSULT_PARENT)
}
- if (FN_AL_CT_DIR.contains(fonctionnalite)) {
- if(securiteSession.hasFonctionIn(
- [
- FonctionEnum.DIRECTION,
- FonctionEnum.ADMIN_LOCAL,
- FonctionEnum.CHEF_TRAVAUX,
- FonctionEnum.CORRESPONDANT_DEPLOIEMENT
- ],
- etablissement.id
- )){
- droitAcquis = true
- }
+ // Fonction Eleve non paramétrable / fonctionnalité parametrable + non paramétrables
+ if (securiteSession.hasFonctionIn([FonctionEnum.ELEVE], etablissement.id)) {
+ fonctionnalitesAccessibles.add(AbsencesFonctionnalite.ABS_CONSULT_ELEVE)
}
- if (FN_RESP.contains(fonctionnalite)) {
- if(securiteSession.hasFonctionIn(
- [
- FonctionEnum.PERS_REL_ELEVE
- ],
- etablissement.id
- )){
- droitAcquis = true
- }
+ // Fonction Enseignant non paramétrable / fonctionnalité parametrable + non paramétrables
+ if (securiteSession.hasFonctionIn([FonctionEnum.ENSEIGNANT], etablissement.id)) {
+ fonctionnalitesAccessibles.addAll(getEnseignantFonctionnalites())
}
- if (FN_EL.contains(fonctionnalite)) {
- if(securiteSession.hasFonctionIn(
- [
- FonctionEnum.ELEVE
- ],
- etablissement.id
- )){
- droitAcquis = true
- }
+ // Ajoute les notifications
+ if (aAccesAuxNotifications(securiteSession)) {
+ fonctionnalitesAccessibles.add(ScolariteFonctionnalites.NOTIFICATION_PREFERNCE_UTILISATEUR)
}
- if (FN_CPE_AL_CT_DIR_ENS_RESP_EL.contains(fonctionnalite)) {
- if (ConfigurationHolder.config.eliot.notification.actif) {
- if(securiteSession.hasFonctionIn(
- [
- FonctionEnum.EDUCATION,
- FonctionEnum.DIRECTION,
- FonctionEnum.ADMIN_LOCAL,
- FonctionEnum.CHEF_TRAVAUX,
- FonctionEnum.ENSEIGNANT,
- FonctionEnum.PERS_REL_ELEVE,
- FonctionEnum.ELEVE,
- ],
- etablissement.id
- )){
- droitAcquis = true
- }
- }
+
+ return fonctionnalitesAccessibles
+ }
+
+ private HashSet getEnseignantFonctionnalites() {
+ return [
+ AbsencesFonctionnalite.ABS_SAISIE_APPELS_EN_CLASSE,
+ AbsencesFonctionnalite.ABS_CONSULT_ENSEIGNANT,
+ AbsencesFonctionnalite.ABS_SAISIE_INC_PUN_SAN,
+ ScolariteFonctionnalites.FICHE_ELEVE_ABSENCES,
+ ScolariteFonctionnalites.FICHE_ELEVE_SANCTIONS,
+ ScolariteFonctionnalites.FICHE_ELEVE_NOTES,
+ ScolariteFonctionnalites.FICHE_ELEVE_CONSEIL
+ ]
+ }
+
+ private HashSet getDirecteurFonctionnalites() {
+ HashSet fonctionnalitesAccessibles =
+ AbsencesFonctionnalite.values().findAll {it.isParametrable()}
+
+ fonctionnalitesAccessibles.addAll([
+ ScolariteFonctionnalites.FICHE_ELEVE,
+ ScolariteFonctionnalites.FICHE_ELEVE_COMMENTAIRE,
+ ScolariteFonctionnalites.FICHE_ELEVE_ABSENCES,
+ ScolariteFonctionnalites.FICHE_ELEVE_SANCTIONS,
+ ScolariteFonctionnalites.FICHE_ELEVE_NOTES,
+ ScolariteFonctionnalites.FICHE_ELEVE_CONSEIL
+ ])
+
+ return fonctionnalitesAccessibles
+ }
+
+
+
+ public Boolean getDroitFonctionnalite(SecuriteSession securiteSession,
+ Etablissement etablissement,
+ AbsencesFonctionnalite fonctionnalite) {
+
+ HashSet fonctionnalitesAccessibles =
+ getFonctionnalitesAccessibles(securiteSession, etablissement)
+
+ if (fonctionnalitesAccessibles.contains(fonctionnalite)) {
+ return true
}
- return droitAcquis
+ return false
}
/**
}
}
- protected List<EliotFonctionnalite> getFonctionnalites() {
- List<EliotFonctionnalite> result = []
- result.addAll(AbsencesFonctionnalite.values().toList())
- return result
+ private boolean aAccesAuxNotifications(SecuriteSession securiteSession) {
+ if (securiteSession.hasFonctionIn([
+ FonctionEnum.DIRECTION,
+ FonctionEnum.CHEF_TRAVAUX,
+ FonctionEnum.EDUCATION,
+ FonctionEnum.ADMIN_LOCAL,
+ FonctionEnum.ENSEIGNANT,
+ FonctionEnum.PERS_REL_ELEVE,
+ FonctionEnum.ELEVE
+ ])) {
+ return true
+ }
+
+ return false
}
+ // TODO : plus besoin de ces fonctions , utiliser toujours : verifieDroitFonctionnalite
+ // todo garder les fonctions de vérification CRUD
/**
* vérifie les droits en consultation des paramétrages générals
* @author bahj
if (!getDroitFonctionnalite(securiteSession,
preferences.etablissement,
- AbsencesFonctionnalite.PARAMETRAGE_GENERAL
+ AbsencesFonctionnalite.ABS_PARAM_GENERAUX
)
) {
throw AutorisationException.consultationContenuException()
if (!getDroitFonctionnalite(
securiteSession,
preferences.etablissement,
- AbsencesFonctionnalite.PARAMETRAGE_GENERAL
+ AbsencesFonctionnalite.ABS_PARAM_GENERAUX
)
) {
throw AutorisationException.modificationContenuException()
if (!getDroitFonctionnalite(
securiteSession,
preferences.etablissement,
- AbsencesFonctionnalite.PARAMETRAGE_IPS
+ AbsencesFonctionnalite.ABS_PARAM_INC_PUN_SAN
)
) {
throw AutorisationException.modificationContenuException()
if (!getDroitFonctionnalite(
securiteSession,
preferences.etablissement,
- AbsencesFonctionnalite.PARAMETRAGE_IPS
+ AbsencesFonctionnalite.ABS_PARAM_INC_PUN_SAN
)
) {
throw AutorisationException.suppressionException()
}
}
-/**
- * Retourne le code du menu correspondant au mode de saisie de l'acteur
- * @param acteur
- * @return un enum Menu
- */
- Menu getModeSaisieForActeur(Acteur acteur) { // Note jtra: il faudrait prendre la securiteSession en paramètre
- SecuriteSession securiteSession = acteur.securiteSession
-
- if (
- securiteSession.hasFonctionIn(
- [
- FonctionEnum.DIRECTION,
- FonctionEnum.EDUCATION,
- FonctionEnum.ADMIN_LOCAL,
- FonctionEnum.CHEF_TRAVAUX,
- FonctionEnum.CORRESPONDANT_DEPLOIEMENT
- ]
- )
- ) {
- return Menu.SAISIE_GESTIONNAIRE
- }
- else if (
- securiteSession.hasFonctionIn(
- [
- FonctionEnum.ENSEIGNANT,
- FonctionEnum.DOCUMENTALISTE
- ]
- )
- ) {
- return Menu.SAISIE_ENSEIGNANT
- }
- return null
- }
-
/**
* détermine s'il faut afficher l'onglet de choix des établissements
* @param securiteSession
return etabs
}
-/**
- * Retourne le premier établissement (par ordre alphabétique) accessible
- * par l'utilisateur
- * @param securiteSesion
- * @return un Etablissement
- */
- Etablissement getPremierEtablissementAccessible(SecuriteSession securiteSession) {
- List<Etablissement> etabs = getEtablissementsAccessiblesForAbsences(
- securiteSession
- )
- if (etabs.size() > 0) {
- return etabs[0]
- } else {
- return null
- }
- }
-
/**
* Retourne true si le profil peut avoir des structures d'enseignements attaché
*
)
}
+ boolean isEnseignantOnlyDroitsIncPunSan (
+ SecuriteSession securiteSession,
+ Etablissement etablissement
+ ){
+
+ return securiteSession.hasFonctionIn([
+ FonctionEnum.ENSEIGNANT,
+ FonctionEnum.DOCUMENTALISTE
+ ], etablissement.id) &&
+ !securiteSession.hasFonctionIn([
+ FonctionEnum.DIRECTION,
+ FonctionEnum.EDUCATION,
+ FonctionEnum.ADMIN_LOCAL,
+ FonctionEnum.CHEF_TRAVAUX,
+ FonctionEnum.CORRESPONDANT_DEPLOIEMENT
+ ], etablissement.id)
+
+ }
+
}
-package org.lilie.services.eliot.absences
+package org.lilie.services.eliot.absences.securite
class DroitsSessionService extends DroitsService {
* <http://www.cecill.info/licences.fr.html>.
*/
-package org.lilie.services.eliot.absences
+package org.lilie.services.eliot.absences.securite
import org.lilie.services.eliot.VerificateurDroitsAcces
import java.math.RoundingMode
import org.lilie.services.eliot.absences.emploidutemps.EmploiDuTempsService
import org.lilie.services.eliot.temps.DateUtil
+import org.lilie.services.eliot.absences.AbsencesFonctionnalite
+import org.lilie.services.eliot.absences.securite.DroitsSessionService
class StatsHebdosService extends AbstractConsultationService {
CalendrierAbsencesService calendrierAbsencesService
EmploiDuTempsService emploiDuTempsService
+ DroitsSessionService droitsSessionService
StatsHebdos calculeStatsHebdos(SecuriteSession securiteSession,
}
- private void verifieDroits(SecuriteSession securiteSession) {
+ private void verifieDroits(SecuriteSession securiteSession)
+ throws AutorisationException {
- if (!securiteSession.hasFonctionIn(
- [
- FonctionEnum.EDUCATION,
- FonctionEnum.DIRECTION,
- FonctionEnum.ADMIN_LOCAL,
- FonctionEnum.CHEF_TRAVAUX
- ],
- securiteSession.etablissementCourant.id
- )) {
- throw AutorisationException.consultationContenuException()
- }
+ droitsSessionService.verifieDroitFonctionnalite(
+ securiteSession,
+ (Etablissement) securiteSession.etablissementCourant,
+ AbsencesFonctionnalite.ABS_STATS
+ )
}
Set<Jour> findAllJourOuverts(PreferencesEtablissementAbsences pref) {
import org.lilie.services.eliot.scolarite.Etablissement
import org.lilie.services.eliot.test.PopulationTestEtablissement
import org.lilie.services.eliot.test.PopulationTestActeur
-import org.lilie.services.eliot.absences.fonctionnalites.AbsencesFonctionnalite
+
import org.lilie.services.eliot.test.LocalInitDonneesCommunesTestService
+import org.lilie.services.eliot.absences.securite.DroitsService
+import org.lilie.services.eliot.absences.fonctionnalites.AbsencesFonctionnaliteAnc
class DroitsServiceIntegrationTests extends GrailsUnitTestCase {
localInitDonneesCommunesTestService.getEtablissement(
PopulationTestEtablissement.ETABLISSEMENT_1
),
- AbsencesFonctionnalite.PARAMETRAGE_GENERAL
+ AbsencesFonctionnalite.ABS_PARAM_GENERAUX
)
} catch (Exception e) {
exceptionLevee = true
localInitDonneesCommunesTestService.getEtablissement(
PopulationTestEtablissement.ETABLISSEMENT_1
),
- AbsencesFonctionnalite.PARAMETRAGE_GENERAL
+ AbsencesFonctionnalite.ABS_PARAM_GENERAUX
)
} catch (Exception e) {
exceptionLevee = true
localInitDonneesCommunesTestService.getEtablissement(
PopulationTestEtablissement.ETABLISSEMENT_1
),
- AbsencesFonctionnalite.PARAMETRAGE_GENERAL
+ AbsencesFonctionnalite.ABS_PARAM_GENERAUX
)
} catch (Exception e) {
exceptionLevee = true
import org.lilie.services.eliot.notes.appreciationclasse.AppreciationClasseService
import org.lilie.services.eliot.notes.appreciationclasse.AppreciationClasse
import org.lilie.services.eliot.utils.NoteFormateur
+import org.lilie.services.eliot.notes.NotesFonctionnalite
+import org.lilie.services.eliot.scolarite.Etablissement
/**
* Cette classe représente le controleur de
*/
def index = {
- notesDroitService.verifieAutorisationByEtablissement(
+ Etablissement etablissementCourant = etablissementCourant()
+
+ Closure verifieDroitFonctionsNonParametrables = {
+ notesDroitService.verifieAutorisationByEtablissement(
+ securiteSession,
+ etablissementCourant,
+ Action.CONSULTATION,
+ (List) (NotesFonction.ENSEIGNANT_ASSIMILE +
+ NotesFonction.DIRECTION_ASSIMILE
+ )
+ )
+ }
+
+ notesDroitService.verifieDroitSurFonctionnaliteParametrable(
securiteSession,
- etablissementCourant(),
- Action.CONSULTATION,
- (List) (NotesFonction.ENSEIGNANT_ASSIMILE +
- NotesFonction.DIRECTION_ASSIMILE
- )
+ etablissementCourant,
+ NotesFonctionnalite.NOTES_CONSULT_APPR,
+ verifieDroitFonctionsNonParametrables
)
+
Map modele = wrapResultat {
List<AppreciationClasse> appreciations = []
List<StructureEnseignement> classes = notesStructureEnseignementService.
findAllClasseForUtilisateur(
securiteSession,
- etablissementCourant(),
+ etablissementCourant,
Action.CONSULTATION)
classes.sort {a, b -> cc.compare(a.code, b.code)}
import org.lilie.services.eliot.impression.template.bulletin.option.ImpressionBulletinOptionsService
import org.lilie.services.eliot.notes.BulletinOptions
import org.lilie.services.eliot.impression.template.bulletin.option.BulletinOptionsPersonnalise
+import org.lilie.services.eliot.notes.NotesFonctionnalite
+import org.lilie.services.eliot.scolarite.Etablissement
/**
* La classe représente le controlleur de "Bulletin" dans menu "Consultation"
*/
def index = {
- notesDroitService.verifieAutorisationByEtablissement(
+ Etablissement etablissementCourant = etablissementCourant()
+
+ Closure verifieDroitFonctionsNonParametrables = {
+ notesDroitService.verifieAutorisationByEtablissement(
+ securiteSession,
+ etablissementCourant,
+ Action.CONSULTATION,
+ (List) (NotesFonction.ENSEIGNANT_ASSIMILE +
+ NotesFonction.DIRECTION_ASSIMILE +
+ [FonctionEnum.ELEVE, FonctionEnum.PERS_REL_ELEVE]
+ )
+ )
+ }
+
+ notesDroitService.verifieDroitSurFonctionnaliteParametrable(
securiteSession,
- etablissementCourant(),
- Action.CONSULTATION,
- (List) (NotesFonction.ENSEIGNANT_ASSIMILE +
- NotesFonction.DIRECTION_ASSIMILE +
- [FonctionEnum.ELEVE, FonctionEnum.PERS_REL_ELEVE]
- )
+ etablissementCourant,
+ NotesFonctionnalite.NOTES_CONSULT_RELEVE_BULLETIN,
+ verifieDroitFonctionsNonParametrables
)
+
Map result = wrapResultat {
StructureEnseignement classe = null
List<Periode> periodeInfos = null
List<StructureEnseignement> classes = notesStructureEnseignementService.
findAllClasseForUtilisateur(
securiteSession,
- etablissementCourant(),
+ etablissementCourant,
Action.CONSULTATION)
classes.sort {a, b -> cc.compare(a.code, b.code)}
import org.lilie.services.eliot.notes.exception.PeriodeNonPublieException
import org.lilie.services.eliot.urllabel.breadcrumbs.BreadCrumbsItemInfo
import org.lilie.services.eliot.annuaire.SecuriteSession
+import org.lilie.services.eliot.notes.NotesFonctionnalite
+import org.lilie.services.eliot.scolarite.Etablissement
/**
* @author bper
Etablissement etablissement = etablissementCourant()
- verifieAutorisation(securiteSession, etablissement)
+ Closure verifieDroitFonctionsNonParametrables = {
+ verifieAutorisation(securiteSession, etablissement)
+ }
+
+ notesDroitService.verifieDroitSurFonctionnaliteParametrable(
+ securiteSession,
+ etablissement,
+ NotesFonctionnalite.NOTES_CONSULT_RELEVE_BULLETIN,
+ verifieDroitFonctionsNonParametrables
+ )
Map result = wrapResultat {
import org.lilie.services.eliot.urllabel.breadcrumbs.BreadCrumbsItemInfo
import org.lilie.services.eliot.notes.AbstractTableauDeNotesController
import org.lilie.services.eliot.scolarite.personne.LocalPersonneService
+import org.lilie.services.eliot.notes.NotesFonctionnalite
+import org.lilie.services.eliot.scolarite.Etablissement
/**
* Consultation des Tableau de Notes (profil directeur)
def index = {
- notesDroitService.verifieAutorisationByEtablissement(
+ Etablissement etablissementCourant = etablissementCourant()
+
+ Closure verifieDroitFonctionsNonParametrables = {
+ notesDroitService.verifieAutorisationByEtablissement(
+ securiteSession,
+ etablissementCourant,
+ Action.CONSULTATION,
+ NotesFonction.DIRECTION_ASSIMILE
+ )
+ }
+
+ notesDroitService.verifieDroitSurFonctionnaliteParametrable(
securiteSession,
- etablissementCourant(),
- Action.CONSULTATION,
- NotesFonction.DIRECTION_ASSIMILE
+ etablissementCourant,
+ NotesFonctionnalite.NOTES_CONSULT_NOTES,
+ verifieDroitFonctionsNonParametrables
)
Map result = wrapResultat {
// get liste de profs + doc + edu
List<Personne> personnes = localPersonneService.findAllPersonByFonctions(
- etablissementCourant(), [
+ etablissementCourant, [
FonctionEnum.ENSEIGNANT,
FonctionEnum.DOCUMENTALISTE,
FonctionEnum.EDUCATION
import org.lilie.services.eliot.urllabel.breadcrumbs.BreadCrumbsItemInfo
import org.lilie.services.eliot.scolarite.AnneeScolaire
import org.lilie.services.eliot.notes.export.AbstractExportController
+import org.lilie.services.eliot.notes.NotesFonctionnalite
+import org.lilie.services.eliot.scolarite.Etablissement
class AdmissionPostBacController extends AbstractExportController {
Etablissement etablissement = etablissementCourant()
- notesDroitService.verifieAutorisationByEtablissement(
+ Closure verifieDroitFonctionsNonParametrables = {
+ notesDroitService.verifieAutorisationByEtablissement(
+ securiteSession,
+ etablissement,
+ Action.CONSULTATION,
+ NotesFonction.DIRECTION_ASSIMILE)
+ }
+
+ notesDroitService.verifieDroitSurFonctionnaliteParametrable(
securiteSession,
etablissement,
- Action.CONSULTATION,
- NotesFonction.DIRECTION_ASSIMILE)
+ NotesFonctionnalite.NOTES_EXPORT,
+ verifieDroitFonctionsNonParametrables
+ )
+
Map result = tryCatch {
import org.lilie.services.eliot.demon.DemandeTraitement
import org.lilie.services.eliot.notes.export.AbstractExportController
import org.lilie.services.eliot.scolarite.AnneeScolaire
+import org.lilie.services.eliot.notes.NotesFonctionnalite
+import org.lilie.services.eliot.scolarite.Etablissement
/**
* Export des notes vers Notanet
def index = {
- notesDroitService.verifieAutorisationByEtablissement(
+ Etablissement etablissement = etablissementCourant()
+
+ Closure verifieDroitFonctionsNonParametrables = {
+ notesDroitService.verifieAutorisationByEtablissement(
+ securiteSession,
+ etablissement,
+ Action.CONSULTATION,
+ NotesFonction.DIRECTION_ASSIMILE)
+ }
+
+ notesDroitService.verifieDroitSurFonctionnaliteParametrable(
securiteSession,
- etablissementCourant(),
- Action.CONSULTATION,
- NotesFonction.DIRECTION_ASSIMILE)
+ etablissement,
+ NotesFonctionnalite.NOTES_EXPORT,
+ verifieDroitFonctionsNonParametrables
+ )
+
Map result = tryCatch {
Map resultat = prepareBaseModele(Page.NOTANET)
import org.lilie.services.eliot.scolarite.personne.eleve.EleveAnnuaireService
import org.lilie.services.eliot.scolarite.Service
import org.lilie.services.eliot.notes.scolarite.NotesServiceService
+import org.lilie.services.eliot.notes.NotesFonctionnalite
+import org.lilie.services.eliot.scolarite.Etablissement
class ParametragesBrevetController extends AbstractNotesController {
def index = {
+
Etablissement etab = etablissementCourant()
- notesDroitService.verifieAutorisationByEtablissement(
+
+ Closure verifieDroitFonctionsNonParametrables = {
+ notesDroitService.verifieAutorisationByEtablissement(
+ securiteSession,
+ etab,
+ Action.CONSULTATION,
+ NotesFonction.DIRECTION_ASSIMILE)
+ }
+
+ notesDroitService.verifieDroitSurFonctionnaliteParametrable(
securiteSession,
etab,
- Action.CONSULTATION,
- NotesFonction.DIRECTION_ASSIMILE)
+ NotesFonctionnalite.NOTES_PARAM,
+ verifieDroitFonctionsNonParametrables
+ )
+
Map result = wrapResultat {
Map resultat = prepareBaseModele(Page.PARAMETRAGES_BREVET)
import org.lilie.services.eliot.notes.notes.NoteTextuelleService
import grails.converters.JSON
+import org.lilie.services.eliot.notes.NotesFonctionnalite
+import org.lilie.services.eliot.scolarite.Etablissement
/**
* Paranetrages generaux
* @author msan
def index = {
- notesDroitService.verifieAutorisationByEtablissement(
+ Etablissement etablissementCourant = etablissementCourant()
+
+ Closure verifieDroitFonctionsNonParametrables = {
+ notesDroitService.verifieAutorisationByEtablissement(
+ securiteSession,
+ etablissementCourant,
+ Action.CONSULTATION,
+ NotesFonction.DIRECTION_ASSIMILE
+ )
+ }
+
+ notesDroitService.verifieDroitSurFonctionnaliteParametrable(
securiteSession,
- etablissementCourant(),
- Action.CONSULTATION,
- NotesFonction.DIRECTION_ASSIMILE
+ etablissementCourant,
+ NotesFonctionnalite.NOTES_PARAM,
+ verifieDroitFonctionsNonParametrables
)
+
Map model = prepareBaseModele(Page.PARAMETRAGES_GENERAUX)
model.precision = null
- if (etablissementCourant()) {
- model.precision = etablissementCourant().etablissementNotes.getPrecision()
+ if (etablissementCourant) {
+ model.precision = etablissementCourant.etablissementNotes.getPrecision()
}
model.annotations = noteTextuelleService.findAllNoteTextuelleAvecUtilisation(
securiteSession,
- etablissementCourant()
+ etablissementCourant
).collect {
[
id: it.id,
import org.lilie.services.eliot.droits.Action
import org.lilie.services.eliot.notes.NotesFonction
import org.lilie.services.eliot.urllabel.breadcrumbs.BreadCrumbsItemInfo
+import org.lilie.services.eliot.notes.NotesFonctionnalite
+import org.lilie.services.eliot.scolarite.Etablissement
/**
* Cette classe représente le controlleur de la vue de "Périodes" dans menu
def index = {
- notesDroitService.verifieAutorisationByEtablissement(
+ Closure verifieDroitFonctionsNonParametrables = {
+ notesDroitService.verifieAutorisationByEtablissement(
+ securiteSession,
+ etablissementCourant(),
+ Action.CONSULTATION,
+ NotesFonction.DIRECTION_ASSIMILE
+ )
+ }
+
+ notesDroitService.verifieDroitSurFonctionnaliteParametrable(
securiteSession,
etablissementCourant(),
- Action.CONSULTATION,
- NotesFonction.DIRECTION_ASSIMILE
+ NotesFonctionnalite.NOTES_PARAM,
+ verifieDroitFonctionsNonParametrables
)
+
render(
view: '/parametrages/periodes/index',
model: prepareBaseModele(Page.PARAMETRAGES_PERIODES)
import org.lilie.services.eliot.scolarite.TypePeriodeService
import org.lilie.services.eliot.scolarite.ModaliteMatiere
import org.lilie.services.eliot.scolarite.Matiere
+import org.lilie.services.eliot.notes.NotesFonctionnalite
+import org.lilie.services.eliot.scolarite.Etablissement
/**
* Cette classe représente le controlleur de la vue de "Services" dans menu
*/
def index = {
- notesDroitService.verifieAutorisationByEtablissement(
+ Etablissement etablissementCourant = etablissementCourant()
+
+ Closure verifieDroitFonctionsNonParametrables = {
+ notesDroitService.verifieAutorisationByEtablissement(
+ securiteSession,
+ etablissementCourant,
+ Action.CONSULTATION,
+ NotesFonction.DIRECTION_ASSIMILE
+ )
+ }
+
+ notesDroitService.verifieDroitSurFonctionnaliteParametrable(
securiteSession,
- etablissementCourant(),
- Action.CONSULTATION,
- NotesFonction.DIRECTION_ASSIMILE
+ etablissementCourant,
+ NotesFonctionnalite.NOTES_PARAM,
+ verifieDroitFonctionsNonParametrables
)
+
Map model = prepareBaseModele(Page.PARAMETRAGES_SERVICES)
String idClasse = params.idClasse
List<StructureEnseignement> classesUtilisateur = notesStructureEnseignementService.
findAllClasseForUtilisateur(
securiteSession,
- etablissementCourant(),
+ etablissementCourant,
Action.MODIFICATION)
classesUtilisateur.sort {a, b -> cc.compare(a.code, b.code)}
// matières
matieres = matiereService.findAllMatiereByEtablissement(securiteSession,
- etablissementCourant())?.collect {[id: it.id, libelle: it.codeGestion]}?.
+ etablissementCourant)?.collect {[id: it.id, libelle: it.codeGestion]}?.
sort { it.libelle }
// modalité matières
modaliteMatieres = modaliteMatiereService.
- getListeModalitesMatiere(securiteSession, etablissementCourant())?.
+ getListeModalitesMatiere(securiteSession, etablissementCourant)?.
collect {[id: it.id, libelle: it.code]}?.sort { it.libelle }
// Liste enseignants + DOC + EDU (CPE)
List<Personne> listePersonnes = localPersonneService.
findAllPersonByFonctions(
- etablissementCourant(), [
+ etablissementCourant, [
FonctionEnum.ENSEIGNANT,
FonctionEnum.EDUCATION,
FonctionEnum.DOCUMENTALISTE
model['structures'] = structures
ReportProprietes reportProprietes =
- reportTraitementService.findTraitementsEnCours(etablissementCourant())
+ reportTraitementService.findTraitementsEnCours(etablissementCourant)
if (reportProprietes) {
model['breadCrumbsInfo'] = construisBreadCrumbsTraitementEnCours()
} else {
CreationSousServicesProperties creationSousServicesProperties =
- creationSousServicesEtatService.findCreationsEnCours(etablissementCourant())
+ creationSousServicesEtatService.findCreationsEnCours(etablissementCourant)
if (creationSousServicesProperties) {
model['breadCrumbsInfo'] = construisBreadCrumbsCreationSousServicesEnCours()
import org.lilie.services.eliot.impression.donnees.DonneesOptions
import org.lilie.services.eliot.impression.template.bulletin.option.ImpressionBulletinOptionsService
import org.lilie.services.eliot.scolarite.TypeIntervalleEnum
+import org.lilie.services.eliot.notes.NotesFonctionnalite
+import org.lilie.services.eliot.scolarite.Etablissement
class PublipostageController extends AbstractNotesController {
def index = {
- notesDroitService.verifieAutorisationByEtablissement(
+ Etablissement etablissementCourant = etablissementCourant()
+
+ Closure verifieDroitFonctionsNonParametrables = {
+ notesDroitService.verifieAutorisationByEtablissement(
+ securiteSession,
+ etablissementCourant,
+ Action.CONSULTATION,
+ NotesFonction.DIRECTION_ASSIMILE
+ )
+ }
+
+ notesDroitService.verifieDroitSurFonctionnaliteParametrable(
securiteSession,
- etablissementCourant(),
- Action.CONSULTATION,
- NotesFonction.DIRECTION_ASSIMILE
+ etablissementCourant,
+ NotesFonctionnalite.NOTES_PUBLIPOST,
+ verifieDroitFonctionsNonParametrables
)
Map modele = prepareBaseModele(Page.PUBLIPOSTAGE_SELECTION)
List<TypePeriode> listePeriodeExamen =
notesTypePeriodeService.findAllByEtablissementAndNature(
securiteSession,
- etablissementCourant(),
+ etablissementCourant,
NaturePeriode.EXAMEN
)
@SuppressWarnings('CatchException')
def publiposteDiffere = {PublipostageCommand command ->
- notesDroitService.verifieAutorisationByEtablissement(
+ Etablissement etablissementCourant = etablissementCourant()
+
+ Closure verifieDroitFonctionsNonParametrables = {
+ notesDroitService.verifieAutorisationByEtablissement(
+ securiteSession,
+ etablissementCourant,
+ Action.CONSULTATION,
+ NotesFonction.DIRECTION_ASSIMILE
+ )
+ }
+
+ notesDroitService.verifieDroitSurFonctionnaliteParametrable(
securiteSession,
- etablissementCourant(),
- Action.CONSULTATION,
- NotesFonction.DIRECTION_ASSIMILE
+ etablissementCourant,
+ NotesFonctionnalite.NOTES_PUBLIPOST,
+ verifieDroitFonctionsNonParametrables
)
Map resultats
* Impression directe
*/
def publiposteDirecte = {
- notesDroitService.verifieAutorisationByEtablissement(
+
+ Etablissement etablissementCourant = etablissementCourant()
+
+ Closure verifieDroitFonctionsNonParametrables = {
+ notesDroitService.verifieAutorisationByEtablissement(
+ securiteSession,
+ etablissementCourant,
+ Action.CONSULTATION,
+ NotesFonction.DIRECTION_ASSIMILE
+ )
+ }
+
+ notesDroitService.verifieDroitSurFonctionnaliteParametrable(
securiteSession,
- etablissementCourant(),
- Action.CONSULTATION,
- NotesFonction.DIRECTION_ASSIMILE
+ etablissementCourant,
+ NotesFonctionnalite.NOTES_PUBLIPOST,
+ verifieDroitFonctionsNonParametrables
)
case TemplateTypeFonctionnaliteEnum.RELEVE_NOTES.name():
eleveImpressionInfos = impressionRequetageBulletinReleveService.findAllInfoForNotes(
securiteSession,
- etablissementCourant(),
+ etablissementCourant,
eleves,
template,
publipostageParametresService.getSelectionAdresseResponsable(params),
case TemplateTypeFonctionnaliteEnum.BREVET.name():
eleveImpressionInfos = impressionRequetageBrevetService.findAllInfoForBrevet(
securiteSession,
- etablissementCourant(),
+ etablissementCourant,
eleves
)
break
)
ByteArrayOutputStream documentPDF = impressionMoteurService.creePdf(
- etablissementCourant(),
+ etablissementCourant,
template,
donneesOptions
)
(Set) eleves,
template,
template.templateEliot.typeFonctionnalite,
- etablissementCourant(),
+ etablissementCourant,
(Personne) (session.personne),
libelleTypePeriode
)
import org.lilie.services.eliot.notes.NotesFonction
import org.lilie.services.eliot.urllabel.breadcrumbs.BreadCrumbsItemInfo
import org.lilie.services.eliot.demon.DemandeTraitementExecutionNonSupprimableException
+import org.lilie.services.eliot.notes.NotesFonctionnalite
+import org.lilie.services.eliot.scolarite.Etablissement
class SuiviImpressionController extends AbstractNotesController {
* Page d'accueil
*/
def index = {
- notesDroitService.verifieAutorisationByEtablissement(
+
+ Etablissement etablissementCourant = etablissementCourant()
+
+ Closure verifieDroitFonctionsNonParametrables = {
+ notesDroitService.verifieAutorisationByEtablissement(
+ securiteSession,
+ etablissementCourant,
+ Action.CONSULTATION,
+ NotesFonction.DIRECTION_ASSIMILE
+ )
+ }
+
+ notesDroitService.verifieDroitSurFonctionnaliteParametrable(
securiteSession,
- etablissementCourant(),
- Action.CONSULTATION,
- NotesFonction.DIRECTION_ASSIMILE
+ etablissementCourant,
+ NotesFonctionnalite.NOTES_PUBLIPOST,
+ verifieDroitFonctionsNonParametrables
)
Map modele = prepareBaseModele(Page.PUBLIPOSTAGE_SUIVI_IMPRESSION)
Calendrier calendrier =
- calendrierService.getCalendrierForEtablissement(etablissementCourant())
+ calendrierService.getCalendrierForEtablissement(etablissementCourant)
modele.anneeScolaire = [
debutAnneeScolaire: calendrier.premierJour ? sdfJS.format(calendrier.premierJour) : null,
import org.lilie.services.eliot.impression.TemplateDocument
import org.lilie.services.eliot.notes.NotesFonction
import org.lilie.services.eliot.urllabel.breadcrumbs.BreadCrumbsItemInfo
+import org.lilie.services.eliot.notes.NotesFonctionnalite
+import org.lilie.services.eliot.scolarite.Etablissement
/**
* Suivi du publipostage
*/
def index = {
- notesDroitService.verifieAutorisationByEtablissement(
+ Etablissement etablissementCourant = etablissementCourant()
+
+ Closure verifieDroitFonctionsNonParametrables = {
+ notesDroitService.verifieAutorisationByEtablissement(
+ securiteSession,
+ etablissementCourant,
+ Action.CONSULTATION,
+ NotesFonction.DIRECTION_ASSIMILE
+ )
+ }
+
+ notesDroitService.verifieDroitSurFonctionnaliteParametrable(
securiteSession,
- etablissementCourant(),
- Action.CONSULTATION,
- NotesFonction.DIRECTION_ASSIMILE
+ etablissementCourant,
+ NotesFonctionnalite.NOTES_PUBLIPOST,
+ verifieDroitFonctionsNonParametrables
)
Map modele = prepareBaseModele(Page.PUBLIPOSTAGE_SUIVI_PAR_ELEVE)
modele.modeles = getAllModeleDeNotes() as JSON
Calendrier calendrier = calendrierService.
- getCalendrierForEtablissement(etablissementCourant())
+ getCalendrierForEtablissement(etablissementCourant)
modele.anneeScolaire = [
debutAnneeScolaire: calendrier.premierJour ? sdfJS.format(calendrier.premierJour) : null,
import org.lilie.services.eliot.notes.brevet.BrevetFicheService
import org.lilie.services.eliot.brevet.BrevetFiche
import org.lilie.services.eliot.notes.brevet.BrevetFicheSaveParams
+import org.lilie.services.eliot.notes.NotesFonctionnalite
+import org.lilie.services.eliot.scolarite.Etablissement
class SaisieBrevetController extends AbstractTableauDeNotesController {
def index = {
- notesDroitService.verifieAutorisationByEtablissement(
+
+ Etablissement etablissementCourant = etablissementCourant()
+
+ Closure verifieDroitFonctionsNonParametrables = {
+ notesDroitService.verifieAutorisationByEtablissement(
+ securiteSession,
+ etablissementCourant,
+ Action.CONSULTATION,
+ (List)(NotesFonction.ENSEIGNANT_ASSIMILE + NotesFonction.DIRECTION_ASSIMILE))
+ }
+
+ notesDroitService.verifieDroitSurFonctionnaliteParametrable(
securiteSession,
- etablissementCourant(),
- Action.CONSULTATION,
- (List)(NotesFonction.ENSEIGNANT_ASSIMILE + NotesFonction.DIRECTION_ASSIMILE))
+ etablissementCourant,
+ NotesFonctionnalite.NOTES_SAISIE_BREVET,
+ verifieDroitFonctionsNonParametrables
+ )
Map result = wrapResultat {
Map resultat = prepareBaseModele(Page.SAISIE_BREVET)
List<StructureEnseignement> classes =
- brevetClasseService.findAllClasseInscritesAuBrevet(etablissementCourant())
+ brevetClasseService.findAllClasseInscritesAuBrevet(etablissementCourant)
classes.sort {a, b -> cc.compare(a.code, b.code)}
StructureEnseignement classe = StructureEnseignement.get(params.classe)
List<BrevetSerie> series =
- brevetSerieService.findAllSeriePourClasse(securiteSession, classe)
+ brevetSerieService.findAllSeriePourClasse(securiteSession, classe)
series.sort{it.libelleCourt}
import org.lilie.services.eliot.notes.avis.AvisService
import org.lilie.services.eliot.notes.BulletinOptions
import org.lilie.services.eliot.applications.notes.BulletinOptionsService
+import org.lilie.services.eliot.notes.NotesFonctionnalite
+import org.lilie.services.eliot.scolarite.Etablissement
/**
* Appréciations saisie par le conseil de classe pour les élèves d'une classe
@SuppressWarnings('UnusedVariable')
def index = {
- notesDroitService.verifieAutorisationByEtablissement(
+ Etablissement etablissementCourant = etablissementCourant()
+
+ Closure verifieDroitFonctionsNonParametrables = {
+ notesDroitService.verifieAutorisationByEtablissement(
+ securiteSession,
+ etablissementCourant,
+ Action.MODIFICATION,
+ (List) (NotesFonction.ENSEIGNANT_ASSIMILE +
+ NotesFonction.DIRECTION_ASSIMILE
+ )
+ )
+ }
+
+ notesDroitService.verifieDroitSurFonctionnaliteParametrable(
securiteSession,
- etablissementCourant(),
- Action.MODIFICATION,
- (List) (NotesFonction.ENSEIGNANT_ASSIMILE +
- NotesFonction.DIRECTION_ASSIMILE
- )
+ etablissementCourant,
+ NotesFonctionnalite.NOTES_SAISIE_SYNTH_CONSEIL,
+ verifieDroitFonctionsNonParametrables
)
Map result = wrapResultat {
List<StructureEnseignement> classes = notesStructureEnseignementService.
findAllClasseForUtilisateur(
securiteSession,
- etablissementCourant(),
+ etablissementCourant,
Action.MODIFICATION)
classes.sort {a, b -> cc.compare(a.code, b.code)}
import org.lilie.services.eliot.notes.AbstractNotesController
import org.lilie.services.eliot.notes.consultation.BulletinComposant
import org.lilie.services.eliot.notes.domaine.PeriodeInfo
-import org.lilie.services.eliot.notes.fonctionnalites.FonctionnaliteSessionService
import org.lilie.services.eliot.notes.impression.synthese.ImpressionSyntheseService
import org.lilie.services.eliot.notes.impression.synthese.OptionsImpressionParams
import org.lilie.services.eliot.notes.page.Page
import org.lilie.services.eliot.notes.resultat.synthese.SyntheseService
import org.lilie.services.eliot.notes.scolarite.NotesStructureEnseignementService
+import org.lilie.services.eliot.notes.NotesFonctionnalite
+import org.lilie.services.eliot.scolarite.Etablissement
+
/**
* Cette classe représente le controleur de
* la vue "Synthèse" dans menu "Saisie"
class SaisieSyntheseController extends AbstractNotesController {
NotesDroitService notesDroitService
- FonctionnaliteSessionService fonctionnaliteSessionService
LocalPersonneService localPersonneService
NotesStructureEnseignementService notesStructureEnseignementService
SyntheseService syntheseService
@SuppressWarnings('UnusedVariable')
def index = {
- notesDroitService.verifieAutorisationByEtablissement(
+ Etablissement etablissementCourant = etablissementCourant()
+
+ Closure verifieDroitFonctionsNonParametrables = {
+ notesDroitService.verifieAutorisationByEtablissement(
+ securiteSession,
+ etablissementCourant,
+ Action.CONSULTATION,
+ (List) (NotesFonction.ENSEIGNANT_ASSIMILE +
+ NotesFonction.DIRECTION_ASSIMILE
+ )
+ )
+ }
+
+ notesDroitService.verifieDroitSurFonctionnaliteParametrable(
securiteSession,
- etablissementCourant(),
- Action.CONSULTATION,
- (List) (NotesFonction.ENSEIGNANT_ASSIMILE +
- NotesFonction.DIRECTION_ASSIMILE
- )
+ etablissementCourant,
+ NotesFonctionnalite.NOTES_SAISIE_SYNTH,
+ verifieDroitFonctionsNonParametrables
)
PreferenceUtilisateurNotes pref =
Map result = wrapResultat {
Synthese synthese = null
Boolean appreciationModifiable = false
+ Boolean consultationApppreciationClasse = false
List serviceInfos = []
List<PeriodeInfo> periodeInfos = null
Long classeId = params.classeId ? Long.valueOf(params.classeId) : null
Periode periode = null
List<Periode> periodesPrecedentes = []
- // Récupère la liste des classes
+ // Récupère la liste des classes
List<StructureEnseignement> classes = notesStructureEnseignementService.
findAllClasseForUtilisateur(
securiteSession,
- etablissementCourant(),
+ etablissementCourant,
Action.CONSULTATION)
classes.sort {a, b -> cc.compare(a.code, b.code)}
securiteSession,
classe)
+ consultationApppreciationClasse = notesDroitService.hasDroitSurFonctionnaliteParametrable(
+ securiteSession,
+ classe.etablissement,
+ NotesFonctionnalite.NOTES_CONSULT_APPR,
+ {
+ return true
+ }
+ )
+
// Période sélectionnée ou la période en cours
periode = (periodeId != null) ? Periode.get(periodeId) :
periodes.find {it.isPeriodeEnCours() && it.isPeriodeXmestre() }
result.periodeId = periodeId
result.classeId = classeId
result.appreciationModifiable = appreciationModifiable
+ result.consultationApppreciationClasse = consultationApppreciationClasse
result.serviceInfos = serviceInfos as JSON
result.periodeInfos = periodeInfos as JSON
result.classeInfos = classes as JSON
* @author bper
*/
def getSyntheseCsv = {
- notesDroitService.verifieAutorisationByEtablissement(
+
+ Closure verifieDroitFonctionsNonParametrables = {
+ notesDroitService.verifieAutorisationByEtablissement(
+ securiteSession,
+ etablissementCourant(),
+ Action.CONSULTATION,
+ (List) (NotesFonction.ENSEIGNANT_ASSIMILE +
+ NotesFonction.DIRECTION_ASSIMILE
+ )
+ )
+ }
+
+ notesDroitService.verifieDroitSurFonctionnaliteParametrable(
securiteSession,
etablissementCourant(),
- Action.CONSULTATION,
- (List) (NotesFonction.ENSEIGNANT_ASSIMILE +
- NotesFonction.DIRECTION_ASSIMILE
- )
+ NotesFonctionnalite.NOTES_SAISIE_SYNTH,
+ verifieDroitFonctionsNonParametrables
)
Map jsonParams = (Map) JSON.parse(params.params)
return tab
}
+
/**
* Gestion du breadCrumbs
*/
import org.lilie.services.eliot.notes.notes.tableaudenotes.EnregistreTableauDeNotesParams
import org.lilie.services.eliot.notes.AbstractTableauDeNotesController
import org.lilie.services.eliot.scolarite.personne.LocalPersonneService
+import org.lilie.services.eliot.notes.NotesFonctionnalite
+import org.lilie.services.eliot.scolarite.Etablissement
/**
* Cette classe définit le controleur de la vue "tableau de notes" dans menu "Saisie"
*/
def index = {
- notesDroitService.verifieAutorisationByEtablissement(
+ Etablissement etablissementCourant = etablissementCourant()
+
+ Closure verifieDroitFonctionsNonParametrables = {
+ notesDroitService.verifieAutorisationByEtablissement(
+ securiteSession,
+ etablissementCourant,
+ Action.CONSULTATION,
+ NotesFonction.ENSEIGNANT_ASSIMILE
+ )
+ }
+
+ notesDroitService.verifieDroitSurFonctionnaliteParametrable(
securiteSession,
- etablissementCourant(),
- Action.CONSULTATION,
- NotesFonction.ENSEIGNANT_ASSIMILE
+ etablissementCourant,
+ NotesFonctionnalite.NOTES_CONSULT_NOTES_MODIF,
+ verifieDroitFonctionsNonParametrables
)
Map result = wrapResultat {
import org.lilie.services.eliot.annuaire.SecuriteSession
import org.lilie.services.eliot.annuaire.FonctionEnum
import org.lilie.services.eliot.notes.NotesFonction
+import org.lilie.services.eliot.notes.NotesFonctionnalite
import org.codehaus.groovy.grails.commons.ConfigurationHolder
/**
// Les utilisateurs à accès restreint n'ont pas accès à Notes
if (!securiteSession.defaultAutorite.aUnAccesRetreint()) {
addFonctionnalitesAccessiblesProfesseur(
- securiteSession,
- fonctionnalitesAccessibles,
- etabId)
+ securiteSession, fonctionnalitesAccessibles, etabId)
+
addFonctionnalitesAccessiblesDirection(
- securiteSession,
- fonctionnalitesAccessibles,
- etabId)
+ securiteSession, fonctionnalitesAccessibles, etabId)
+
addFonctionnalitesAccessiblesParent(
- securiteSession,
- fonctionnalitesAccessibles,
- etabId)
+ securiteSession, fonctionnalitesAccessibles, etabId)
+
addFonctionnalitesAccessiblesEleve(
- securiteSession,
- fonctionnalitesAccessibles,
- etabId)
+ securiteSession, fonctionnalitesAccessibles, etabId)
+
addFonctionnalitesAccessiblesDirectionSansCD(
+ securiteSession, fonctionnalitesAccessibles, etabId)
- securiteSession,
- fonctionnalitesAccessibles,
- etabId
- )
+ addFonctionnalitesParametrables(
+ securiteSession, fonctionnalitesAccessibles, etabId)
}
return fonctionnalitesAccessibles
// prof, documentaliste, personel d'éducation (cpe)
// prof || documentaliste || education (cpe) ont les même droits
- if (securiteSession.hasFonctionIn(NotesFonction.ENSEIGNANT_ASSIMILE, etabId)) {
+ if (hasNonParametrableFonctionIn(securiteSession, NotesFonction.ENSEIGNANT_ASSIMILE, etabId)) {
fonctionnalitesAccessibles.add(Fonctionnalite.SAISIE_TABLEAU_DE_NOTES)
fonctionnalitesAccessibles.add(Fonctionnalite.SAISIE_SYNTHESE)
fonctionnalitesAccessibles.add(Fonctionnalite.SAISIE_EVALUATION)
HashSet<Fonctionnalite> fonctionnalitesAccessibles,
long etabId) {
// direction, chef travaux, admin local, correspondent de deploiement
- if (securiteSession.hasFonctionIn(NotesFonction.DIRECTION_ASSIMILE, etabId)) {
+ if (hasNonParametrableFonctionIn(securiteSession, NotesFonction.DIRECTION_ASSIMILE, etabId)) {
fonctionnalitesAccessibles.add(Fonctionnalite.PARAMETRAGES_SERVICES)
fonctionnalitesAccessibles.add(Fonctionnalite.PARAMETRAGES_PERIODES)
fonctionnalitesAccessibles.add(Fonctionnalite.PARAMETRAGES_GENERAUX)
- //fonctionnalitesAccessibles.add(Fonctionnalite.PARAMETRAGES_ETABLISSEMENT)
fonctionnalitesAccessibles.add(Fonctionnalite.SAISIE_SYNTHESE)
fonctionnalitesAccessibles.add(Fonctionnalite.CONSULTATION_TABLEAU_DE_NOTES)
fonctionnalitesAccessibles.add(Fonctionnalite.CONSULTATION_BULLETIN)
FonctionEnum.ADMIN_LOCAL
]
- if (securiteSession.hasFonctionIn(directionAssimileSansCD, etabId)) {
+ if (hasNonParametrableFonctionIn(securiteSession, directionAssimileSansCD, etabId)) {
if (ConfigurationHolder.config.eliot.notification.actif) {
fonctionnalitesAccessibles.add(Fonctionnalite.NOTIFICATION_PREFERNCE_UTILISATEUR)
}
HashSet<Fonctionnalite> fonctionnalitesAccessibles,
long etabId) {
// parent
- if (securiteSession.hasFonctionIn([FonctionEnum.PERS_REL_ELEVE], etabId)) {
+ if (hasNonParametrableFonctionIn(securiteSession, [FonctionEnum.PERS_REL_ELEVE], etabId)) {
fonctionnalitesAccessibles.add(Fonctionnalite.CONSULTATION_RELEVE_DE_NOTES)
fonctionnalitesAccessibles.add(Fonctionnalite.CONSULTATION_BULLETIN)
if (ConfigurationHolder.config.eliot.notification.actif) {
HashSet<Fonctionnalite> fonctionnalitesAccessibles,
long etabId) {
// élève
- if (securiteSession.hasFonctionIn([FonctionEnum.ELEVE], etabId)) {
+ if (hasNonParametrableFonctionIn(securiteSession, [FonctionEnum.ELEVE], etabId)) {
fonctionnalitesAccessibles.add(Fonctionnalite.CONSULTATION_RELEVE_DE_NOTES)
fonctionnalitesAccessibles.add(Fonctionnalite.CONSULTATION_BULLETIN)
if (ConfigurationHolder.config.eliot.notification.actif) {
}
}
}
+
+ private def addFonctionnalitesParametrables(SecuriteSession securiteSession,
+ HashSet<Fonctionnalite> fonctionnalitesAccessibles,
+ long etabId) {
+
+ if (securiteSession.hasAccesFonctionnalite(NotesFonctionnalite.NOTES_PARAM, etabId)) {
+ fonctionnalitesAccessibles.add(Fonctionnalite.PARAMETRAGES_SERVICES)
+ fonctionnalitesAccessibles.add(Fonctionnalite.PARAMETRAGES_PERIODES)
+ fonctionnalitesAccessibles.add(Fonctionnalite.PARAMETRAGES_GENERAUX)
+
+ if (ConfigurationHolder.config.eliot.notes?.notanet?.actif) {
+ fonctionnalitesAccessibles.add(Fonctionnalite.PARAMETRAGES_BREVET)
+ }
+ }
+
+ if (securiteSession.hasAccesFonctionnalite(NotesFonctionnalite.NOTES_PUBLIPOST, etabId)) {
+ fonctionnalitesAccessibles.add(Fonctionnalite.PUBLIPOSTAGE_SELECTION)
+ fonctionnalitesAccessibles.add(Fonctionnalite.PUBLIPOSTAGE_SUIVI_PAR_ELEVE)
+ fonctionnalitesAccessibles.add(Fonctionnalite.PUBLIPOSTAGE_SUIVI_IMPRESSION)
+ }
+
+ if (securiteSession.hasAccesFonctionnalite(NotesFonctionnalite.NOTES_SAISIE_SYNTH, etabId)) {
+ fonctionnalitesAccessibles.add(Fonctionnalite.SAISIE_SYNTHESE)
+ }
+
+ if (securiteSession.hasAccesFonctionnalite(NotesFonctionnalite.NOTES_CONSULT_NOTES, etabId)) {
+ fonctionnalitesAccessibles.add(Fonctionnalite.CONSULTATION_TABLEAU_DE_NOTES)
+ }
+
+ if (securiteSession.hasAccesFonctionnalite(NotesFonctionnalite.NOTES_CONSULT_RELEVE_BULLETIN, etabId)) {
+ fonctionnalitesAccessibles.add(Fonctionnalite.CONSULTATION_BULLETIN)
+ fonctionnalitesAccessibles.add(Fonctionnalite.CONSULTATION_RELEVE_DE_NOTES)
+ }
+
+ if (securiteSession.hasAccesFonctionnalite(NotesFonctionnalite.NOTES_CONSULT_APPR, etabId)) {
+ fonctionnalitesAccessibles.add(Fonctionnalite.CONSULTATION_APPRECIATION_CLASSE)
+ }
+
+ if (securiteSession.hasAccesFonctionnalite(NotesFonctionnalite.NOTES_EXPORT, etabId)) {
+ fonctionnalitesAccessibles.add(Fonctionnalite.ADMISSION_POST_BAC)
+
+ if (ConfigurationHolder.config.eliot.notes?.notanet?.actif) {
+ fonctionnalitesAccessibles.add(Fonctionnalite.NOTANET)
+ }
+ }
+
+ if (securiteSession.hasAccesFonctionnalite(NotesFonctionnalite.NOTES_SAISIE_BREVET, etabId)) {
+ if (ConfigurationHolder.config.eliot.notes?.notanet?.actif) {
+ fonctionnalitesAccessibles.add(Fonctionnalite.SAISIE_BREVET)
+ }
+ }
+
+ }
+
+ private boolean hasNonParametrableFonctionIn(SecuriteSession securiteSession,
+ List<FonctionEnum> fonctions, Long etabId) {
+
+ List<FonctionEnum> fonctionsNonParametrables =
+ fonctions.findAll {it.accesParametrable == false}
+
+ if (fonctionsNonParametrables.size() == 0) {
+ return false
+ }
+
+ return securiteSession.hasFonctionIn(fonctionsNonParametrables, etabId)
+ }
+
}
eliot.notes.saisie.synthese.Modele.data.periodeId = '${periodeId}';
eliot.notes.saisie.synthese.Modele.data.classeId = '${classeId}';
eliot.notes.saisie.synthese.Modele.data.appreciationModifiable = ${appreciationModifiable ?: false};
+ eliot.notes.saisie.synthese.Modele.data.consultationApppreciationClasse = ${consultationApppreciationClasse ?: false};
eliot.notes.saisie.synthese.Modele.data.listeStructureEnseignements = ${classeInfos ?: '[]'};
eliot.notes.saisie.synthese.Modele.data.periodeInfos = ${periodeInfos ?: '[]'};
}
// Bouton "Appréciation classe"
- if (!desactiveBouton) {
+ if ((!desactiveBouton) &&
+ (this.ConfigServeur.data.consultationApppreciationClasse == true)) {
+
this.btnAppreciationClasse = new Ext.Button({
text: this.ConfigServeur.libelle.appreciationClasse,
icon: this.ConfigServeur.icon.appreciationClasse,
import org.lilie.services.eliot.AbstractEliotController
import org.lilie.services.eliot.menu.MenuInfo
-import org.lilie.services.eliot.scolarite.menu.MenuService
import org.lilie.services.eliot.absences.PreferencesEtablissementAbsences
import org.lilie.services.eliot.scolarite.etablissement.PreferencesEtablissementAbsencesService
import org.lilie.services.eliot.scolarite.anneescolaire.AnneeScolaireService
import org.lilie.services.eliot.urllabel.aide.AideItemInfo
import org.lilie.services.eliot.scolarite.breadcrumbs.MenuAideScolariteService
import org.lilie.services.eliot.CodeComparator
+import org.lilie.services.eliot.scolarite.menu.description.MenuSousMenu
+import org.lilie.services.eliot.scolarite.menu.description.MenuEntete
+import org.lilie.services.eliot.annuaire.EliotFonctionnalites
+import org.lilie.services.eliot.annuaire.SecuriteSession
+import org.lilie.services.eliot.menu.MenuApplication
+import org.lilie.services.eliot.menu.MenuService
/**
* Classe abstraite pour définir les controlleurs de scolarite
CodeComparator cc = new CodeComparator()
+
+ private MenuApplication getMenuApplication() {
+
+ return new MenuApplication(
+ entetes: MenuEntete.collect {it},
+ sousMenus: MenuSousMenu.collect {it}
+ )
+
+ }
+
+ private List<EliotFonctionnalites> findAllFonctionnalite(SecuriteSession securiteSession,
+ Etablissement etablissement) {
+ return droitsService.findAllFonctionnalite(
+ securiteSession,
+ etablissement
+ )
+
+ }
+
+
protected MenuInfo buildMenuInfo(Object page) {
+
return menuService.getMenuInfo(
getSecuriteSession(),
page,
- etablissementCourant()
+ findAllFonctionnalite(securiteSession, etablissementCourant()),
+ getMenuApplication()
)
+
}
/**
List<BreadCrumbsItemInfo> breadCrumbsInfo = []
Etablissement etablissementCourant =
- (Etablissement) getSecuriteSession().etablissementCourant
+ (Etablissement) getSecuriteSession().etablissementCourant
BreadCrumbsItemInfo breadCrumbsItemInfoEnTete = new BreadCrumbsItemInfo(
codeLabel: 'filAriane.accueil',
class ApplicationController extends AbstractScolariteController {
- DroitsService droitsService
-
def index = {
if (isModeMaintenance()) {
chain(controller: 'maintenance')
* Page par défaut de la section 'Synchronisation emploi du temps'
*/
def index = {
+
+
Boolean synchroEnCours = false
Etablissement etablissement = etablissementCourant()
ScolariteNiveauGeneralService scolariteNiveauGeneralService
LocalStructureEnseignementService localStructureEnseignementService
-
def index = {
- if (!securiteSession.hasFonctionIn(
- [FonctionEnum.DIRECTION, FonctionEnum.CHEF_TRAVAUX, FonctionEnum.ADMIN_LOCAL],
- etablissementCourantId())) {
+
+ Boolean acces = droitsService.accesFonctionnalite(
+ getSecuriteSession(),
+ etablissementCourant(),
+ ScolariteFonctionnalites.SCOL_PARAM_NIV.toString()
+ )
+
+ if (!acces) {
throw AutorisationException.consultationContenuException()
}
List<StructureEnseignement> classes =
localStructureEnseignementService.findAllClasseByEtablissement(etablissementCourant())
- classes.sort{a,b -> cc.compare(a.code, b.code)}
+ classes.sort {a, b -> cc.compare(a.code, b.code)}
List<NiveauGeneral> niveaux =
scolariteNiveauGeneralService.findAllNiveauGeneralByEtablissement(etablissementCourant())
public enum Page {
PARAMETRAGE_NIVEAU(GroupePage.PARAMETRAGE),
+ PARAMETRAGE_ACCES_FONCTIONS(GroupePage.PARAMETRAGE),
PARAMETRAGE_MATIERES(GroupePage.PARAMETRAGE),
PARAMETRAGE_CALENDRIER_HEBDO(GroupePage.PARAMETRAGE),
PARAMETRAGE_CALENDRIER_ANNUEL(GroupePage.PARAMETRAGE),
--- /dev/null
+/*
+* Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+* This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+*
+* Lilie is free software. You can redistribute it and/or modify since
+* you respect the terms of either (at least one of the both license) :
+* - under the terms of the GNU Affero General Public License as
+* published by the Free Software Foundation, either version 3 of the
+* License, or (at your option) any later version.
+* - the CeCILL-C as published by CeCILL-C; either version 1 of the
+* License, or any later version
+*
+* There are special exceptions to the terms and conditions of the
+* licenses as they are applied to this software. View the full text of
+* the exception in file LICENSE.txt in the directory of this software
+* distribution.
+*
+* Lilie is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* Licenses for more details.
+*
+* You should have received a copy of the GNU General Public License
+* and the CeCILL-C along with Lilie. If not, see :
+* <http://www.gnu.org/licenses/> and
+* <http://www.cecill.info/licences.fr.html>.
+*/
+
+
+package org.lilie.services.eliot.scolarite.parametrages.accesfonction
+
+import org.lilie.services.eliot.urllabel.UrlLabelInfo
+import org.lilie.services.eliot.urllabel.breadcrumbs.BreadCrumbsItemInfo
+import org.lilie.services.eliot.scolarite.page.Page
+import org.lilie.services.eliot.scolarite.AbstractScolariteController
+import org.lilie.services.eliot.securite.fonctionnalite.saisie.SaisieFonctionnaliteService
+import org.lilie.services.eliot.securite.fonctionnalite.saisie.SaisieFonctionnaliteMarshallerService
+import org.lilie.services.eliot.annuaire.Fonction
+import org.lilie.services.eliot.scolarite.Personne
+import org.lilie.services.eliot.scolarite.Etablissement
+import org.lilie.services.eliot.annuaire.FonctionEnum
+import org.lilie.services.eliot.securite.AutorisationException
+import grails.converters.JSON
+import org.lilie.services.eliot.securite.fonctionnalite.saisie.FonctionnaliteArbre
+import org.lilie.services.eliot.securite.fonctionnalite.saisie.FonctionnaliteParams
+import org.lilie.services.eliot.securite.fonctionnalite.saisie.FonctionParams
+import org.lilie.services.eliot.securite.fonctionnalite.saisie.FonctionnalitePersonneElement
+import org.lilie.services.eliot.securite.fonctionnalite.saisie.FonctionnalitePersonneParams
+
+/**
+ * @author bahj , othe
+ */
+class ParametrageAccesFonctionnaliteController extends AbstractScolariteController {
+
+ SaisieFonctionnaliteService saisieFonctionnaliteService
+ SaisieFonctionnaliteMarshallerService saisieFonctionnaliteMarshallerService
+
+ def index = {
+
+ if (!securiteSession.hasFonctionIn([FonctionEnum.DIRECTION])) {
+ throw AutorisationException.consultationContenuException()
+ }
+
+
+ Map model = prepareBaseModele(Page.PARAMETRAGE_ACCES_FONCTIONS)
+
+ Etablissement etablissement = etablissementCourant()
+
+
+ List<Fonction> allFonctionParametrable =
+ saisieFonctionnaliteService.findAllfonction()
+ List<Personne> allPersonneParametrable =
+ saisieFonctionnaliteService.findAllPersonne(etablissement)
+
+ model.fonctionsData = saisieFonctionnaliteMarshallerService.
+ marshallAllFonctionParametrable(allFonctionParametrable) as JSON
+
+ model.utilisateursData = saisieFonctionnaliteMarshallerService.
+ marshallallPersonneParametrable(allPersonneParametrable) as JSON
+
+ render(
+ view: '/parametrages/accesfonction/index',
+ model: model
+ )
+ }
+
+
+ def enregistreFonctionsParam = {
+
+ def result
+
+ try {
+ List<FonctionnaliteParams> listeFonctionnaliteParam = getParametreEnregistreFonction(params)
+
+ saisieFonctionnaliteService.enregistreDroitFonction(
+ etablissementCourant(),
+ listeFonctionnaliteParam
+ )
+
+ result = [success: true, message: message(code: 'scolarite.parametrage.fonctionnalite.fonction.modifieSucces')]
+
+ } catch (Exception e) {
+ //qqsoit l'erreur on envoi un message d'erreur.
+ log.debug "enregistreFonctionsParam", e
+ result = [success: false, message: message(code: 'scolarite.parametrage.fonctionnalite.fonction.modifieEchec')]
+ }
+
+ render result as JSON
+ }
+
+ def enregistreUtilisateurParam = {
+
+ FonctionnalitePersonneParams fonctionnalitePersonneParams = getParametreEnregistrePersonne(params)
+
+ saisieFonctionnaliteService.enregistreDroitPersonne(
+ etablissementCourant(),
+ fonctionnalitePersonneParams
+ )
+
+ def result = [success: true, message: message(code: 'scolarite.parametrage.fonctionnalite.utilisateur.modifieSucces')]
+
+ render result as JSON
+ }
+
+
+ def getFonctionsParametrage = {
+
+ String listeId = params.selectionIds
+
+ List<String> ids = listeId.split(',')
+ List<Fonction> allFonctions = ids.collect {
+ Fonction.get(Long.parseLong(it))
+ }
+
+ FonctionnaliteArbre arbre = saisieFonctionnaliteService.getAllAcces(
+ etablissementCourant(),
+ allFonctions
+ )
+
+ Map parametrages = [:]
+
+ parametrages['data'] = saisieFonctionnaliteMarshallerService.marshallFonction(
+ arbre,
+ request.locale
+ )
+
+ List mapping = []
+
+ allFonctions.each {Fonction fonction ->
+
+ String messageCodeLibelle =
+ FonctionEnum.parseFromCode(fonction.code).getLibelle()
+
+ Map enteteColonne = [:]
+ enteteColonne['header'] = message(code: messageCodeLibelle)
+ enteteColonne['dataIndex'] = fonction.code
+ mapping << enteteColonne
+
+ }
+
+ parametrages['mapping'] = mapping
+
+ Map result = [success: true, parametrages: parametrages]
+
+ render result as JSON
+ }
+
+ def getUtilisateurParametrage = {
+
+ String personneId = params.selectionIds
+
+ Personne personne = Personne.load(Long.parseLong(personneId))
+
+ List mapping = [
+ [
+ header: 'Accès',
+ dataIndex: 'isSelectionne'
+ ]
+ ]
+
+ FonctionnaliteArbre fonctionnaliteArbre = saisieFonctionnaliteService.getAllAcces(
+ etablissementCourant(),
+ personne
+ )
+
+ List data = saisieFonctionnaliteMarshallerService.marshallFonction(
+ fonctionnaliteArbre,
+ request.locale
+ )
+
+ Map parametrages = [data: data, mapping: mapping]
+ Map result = [success: true, parametrages: parametrages]
+
+ render result as JSON
+ }
+
+ private FonctionnalitePersonneParams getParametreEnregistrePersonne(Map params) {
+
+ def param = JSON.parse(params.data)
+
+ FonctionnalitePersonneParams fonctionnalitePersonneParams = new FonctionnalitePersonneParams()
+
+ fonctionnalitePersonneParams.personneId = Long.parseLong(params.selectionIds)
+
+ param.each {
+
+ FonctionnalitePersonneElement fonctionnaliteParam = new FonctionnalitePersonneElement(
+ fonctionnaliteId: it.fonctionaliteId,
+ actif: it.parametres.isSelectionne
+ )
+
+
+ fonctionnalitePersonneParams.listeFonctionnalitePersonne << fonctionnaliteParam
+
+ }
+
+ return fonctionnalitePersonneParams
+
+ }
+
+ private List<FonctionnaliteParams> getParametreEnregistreFonction(Map params) {
+
+ def param = JSON.parse(params.data)
+
+ List<FonctionnaliteParams> listeFonctionnaliteParam = []
+ param.each {
+
+ FonctionnaliteParams fonctionnaliteParam = new FonctionnaliteParams(
+ fonctionnaliteId: it.fonctionaliteId
+ )
+
+ it.parametres.each {
+ k, v ->
+ fonctionnaliteParam.parametres << new FonctionParams(
+ codeFonction: k,
+ actif: v
+ )
+
+ }
+
+
+ listeFonctionnaliteParam << fonctionnaliteParam
+
+ }
+
+ return listeFonctionnaliteParam
+
+ }
+
+ /**
+ * Gestion du breadCrumbs
+ * @return
+ */
+ protected List<UrlLabelInfo> getBreadCrumbsInfo() {
+ List<UrlLabelInfo> breadCrumbsInfo = super.getBreadCrumbsInfo()
+ breadCrumbsInfo << new BreadCrumbsItemInfo(
+ codeLabel: 'scolarite.breadCrumbs.parametrage.accesfonction'
+
+ )
+
+ return breadCrumbsInfo
+ }
+
+
+}
\ No newline at end of file
import org.lilie.services.eliot.parametrages.calendrier.EtatJourEnum
import org.lilie.services.eliot.scolarite.AnneeScolaire
import org.lilie.services.eliot.urllabel.breadcrumbs.BreadCrumbsItemInfo
+import org.lilie.services.eliot.scolarite.ScolariteFonctionnalites
+import org.lilie.services.eliot.securite.AutorisationException
class ParametrageCalendrierAnnuelController extends AbstractScolariteController {
CalendrierSessionService calendrierSessionService
- DroitsService droitsService
ControleCalendrierService controleCalendrierService
def index = {
+ Boolean acces = droitsService.accesFonctionnalite(
+ getSecuriteSession(),
+ etablissementCourant(),
+ ScolariteFonctionnalites.SCOL_PARAM_CAL_HEBDO_ANNU.toString()
+ )
+
+ if (!acces) {
+ throw AutorisationException.consultationContenuException()
+ }
+
Calendrier calendrier = calendrierSessionService.
getCalendrierForEtablissement(etablissementCourant())
import org.lilie.services.eliot.annuaire.SecuriteSession
import org.lilie.services.eliot.parametrages.calendrier.PlageHoraireService
import org.lilie.services.eliot.urllabel.breadcrumbs.BreadCrumbsItemInfo
+import org.lilie.services.eliot.scolarite.ScolariteFonctionnalites
+import org.lilie.services.eliot.securite.AutorisationException
class ParametrageCalendrierHebdoController extends AbstractScolariteController {
PlageHoraireService plageHoraireService
def index = {
+
+ Boolean acces = droitsService.accesFonctionnalite(
+ getSecuriteSession(),
+ etablissementCourant(),
+ ScolariteFonctionnalites.SCOL_PARAM_CAL_HEBDO_ANNU.toString()
+ )
+
+ if (!acces) {
+ throw AutorisationException.consultationContenuException()
+ }
+
render(
view: '/parametrages/calendrier/calendrierHebdo',
model: prepareBaseModele(Page.PARAMETRAGE_CALENDRIER_HEBDO)
import org.lilie.services.eliot.scolarite.matiere.MatiereService
import org.lilie.services.eliot.scolarite.ModaliteMatiereService
import org.lilie.services.eliot.urllabel.breadcrumbs.BreadCrumbsItemInfo
+import org.lilie.services.eliot.scolarite.ScolariteFonctionnalites
+import org.lilie.services.eliot.securite.AutorisationException
class ParametragesMatieresController extends AbstractScolariteController {
ModaliteMatiereService modaliteMatiereService
def index = {
+
+ Boolean acces = droitsService.accesFonctionnalite(
+ getSecuriteSession(),
+ etablissementCourant(),
+ ScolariteFonctionnalites.SCOL_PARAM_MATIERES.toString()
+ )
+
+ if (!acces) {
+ throw AutorisationException.consultationContenuException()
+ }
+
Map model = prepareBaseModele(Page.PARAMETRAGE_MATIERES)
render(
view: '/parametrages/matieres/index',
import org.lilie.services.eliot.impression.TemplateDocument
import org.lilie.services.eliot.impression.ImpressionServiceNomUniqueException
import org.lilie.services.eliot.impression.template.ImpressionTemplateDocumentService
+import org.lilie.services.eliot.scolarite.ScolariteFonctionnalites
+import org.lilie.services.eliot.securite.AutorisationException
class ImpressionEditionController extends AbstractEditionController {
def index = {
+
+ Boolean acces = droitsService.accesFonctionnalite(
+ getSecuriteSession(),
+ etablissementCourant(),
+ ScolariteFonctionnalites.SCOL_PARAM_MODELES_DOC.toString()
+ )
+
+ if (!acces) {
+ throw AutorisationException.consultationContenuException()
+ }
+
Map modele = prepareBaseModele(Page.PARAMETRAGE_MODELE_DOCUMENT)
modele.listeMedia = listeMedia() as JSON
import org.lilie.services.eliot.scolarite.TypeActiviteDevoir
import org.lilie.services.eliot.securite.AutorisationException
import org.springframework.dao.DataIntegrityViolationException
+import org.lilie.services.eliot.scolarite.ScolariteFonctionnalites
/**
* @author agia
TypeActiviteService typeActiviteService
def index = {
+
+
+ Boolean acces = droitsService.accesFonctionnalite(
+ getSecuriteSession(),
+ etablissementCourant(),
+ ScolariteFonctionnalites.SCOL_PARAM_TYP_ACT_DEV.toString()
+ )
+
+ if (!acces) {
+ throw AutorisationException.consultationContenuException()
+ }
+
+
Map model = prepareBaseModele(Page.PARAMETRAGE_TYPES_ACTIVITES_DEVOIRS)
render(
view: '/parametrages/typesActivitesDevoirs/index',
eliot.scolarite.menu.parametrages.typesActivitesDevoirs.titrePrincipal=Types activités/devoirs
eliot.scolarite.menu.parametrages.notification=Notifications
eliot.scolarite.menu.parametrages.niveau=Niveaux
+eliot.scolarite.menu.parametrages.accesfonction=Accès aux fonctions
## file ariane
filAriane.accueil=Scolarité de l''établissement {0} ({1})
eliot.scolarite.message.suppressionConfirmation = Confirmez-vous la suppression du modèle
eliot.scolarite.message.suppressionTitre = Suppression d'un modèle de document
eliot.scolarite.message.attention=Attention !
+eliot.scolarite.message.avertissement=Vous n'avez pas enregistré vos paramètres. Etes-vous sûr de vouloir continuer ?
eliot.scolarite.messages.selectionneImage = Veuillez sélectionner une image.
eliot.scolarite.messages.formatImage = Le format de l'image est incorrect : seul le format JPEG est autorisé.
scolarite.breadCrumbs.parametrage.calendrier.hebdo=Calendrier hebdomadaire
scolarite.breadCrumbs.parametrage.calendrier.annuel=Calendrier annuel
+scolarite.breadCrumbs.parametrage.accesfonction=Accès aux fonctions
scolarite.breadCrumbs.parametrage.modeleDeDocument=Modèle de documents
scolarite.breadCrumbs.parametrage.creerModeleDeDocument=Création d'un modèle de documents
scolarite.breadCrumbs.parametrage.modifierModeleDeDocument=Modification d'un modèle de documents
eliot.scolarite.message.AutorisationException=Accès refusé
eliot.scolarite.message.erreurInconnue=Pour des raisons techniques, votre requête n'a pas été prise en compte. Veuillez renouveler votre opération
+eliot.scolarite.message.modificationNonEnregistree =Vous devez enregistrer ou annuler votre saisie avant de poursuivre.
+
+eliot.libelle.utilisateur=Utilisateur
+eliot.libelle.fonctions=Fonctions
+eliot.libelle.fonctionnalites=Fonctionnalités
+eliot.libelle.acces=Accès
+
+fonctionnalite.parametrage.SCOL=Scolarit\u00e9
+fonctionnalite.parametrage.SCOL_EDT=Emploi du temps
+fonctionnalite.parametrage.SCOL_PARAM=Param\u00e9trages
+fonctionnalite.parametrage.SCOL_PARAM_NIV=Niveaux
+fonctionnalite.parametrage.SCOL_PARAM_MATIERES=Mati\u00e8res
+fonctionnalite.parametrage.SCOL_PARAM_TYP_ACT_DEV=Types activit\u00e9s/devoirs
+fonctionnalite.parametrage.SCOL_PARAM_CAL_HEBDO_ANNU=Calendrier hebdomadaire/annuel
+fonctionnalite.parametrage.SCOL_PARAM_MODELES_DOC=Mod\u00e8les de documents
+fonctionnalite.parametrage.FICHE_ELEVE=Fiche \u00e9l\u00e8ve
+fonctionnalite.parametrage.FICHE_ELEVE_COMMENTAIRE=Commentaire
+fonctionnalite.parametrage.FICHE_ELEVE_ABSENCES=Absences
+fonctionnalite.parametrage.FICHE_ELEVE_SANCTIONS=Sanctions
+fonctionnalite.parametrage.FICHE_ELEVE_NOTES=Notes
+fonctionnalite.parametrage.FICHE_ELEVE_CONSEIL=Conseil
+fonctionnalite.parametrage.ABS=Absences
+fonctionnalite.parametrage.ABS_SAISIE=Saisie
+fonctionnalite.parametrage.ABS_SAISIE_APPELS=Appels
+fonctionnalite.parametrage.ABS_SAISIE_ABS_RETARDS_DEPARTS=Absences/Retards/D\u00e9parts
+fonctionnalite.parametrage.ABS_SAISIE_DEMI_PENSION_INTERNAT=Demi-pension/Internat
+fonctionnalite.parametrage.ABS_SAISIE_INC_PUN_SAN=Incidents/Punitions/Sanctions
+fonctionnalite.parametrage.ABS_CONSULT=Consultation
+fonctionnalite.parametrage.ABS_STATS=Statistiques
+fonctionnalite.parametrage.ABS_PARAM=Param\u00e9trages
+fonctionnalite.parametrage.ABS_PARAM_GENERAUX=G\u00e9n\u00e9raux
+fonctionnalite.parametrage.ABS_PARAM_MOTIFS=Motifs
+fonctionnalite.parametrage.ABS_PARAM_INC_PUN_SAN=Incidents, punitions et sanctions
+fonctionnalite.parametrage.ABS_PUBLIPOSTAGE=Publipostage
+fonctionnalite.parametrage.NOTES=Notes
+fonctionnalite.parametrage.NOTES_SAISIE=Saisie
+fonctionnalite.parametrage.NOTES_SAISIE_SYNTH=Synth\u00e8ses
+fonctionnalite.parametrage.NOTES_SAISIE_SYNTH_CONSEIL=Conseil de classe
+fonctionnalite.parametrage.NOTES_SAISIE_BREVET=Fiches Brevet
+fonctionnalite.parametrage.NOTES_CONSULT=Consultation
+fonctionnalite.parametrage.NOTES_CONSULT_NOTES=Notes et appr\u00e9ciations
+fonctionnalite.parametrage.NOTES_CONSULT_NOTES_MODIF=Modification
+fonctionnalite.parametrage.NOTES_CONSULT_RELEVE_BULLETIN=Relev\u00e9s de notes/Bulletins
+fonctionnalite.parametrage.NOTES_CONSULT_APPR=Appr\u00e9ciations classes
+fonctionnalite.parametrage.NOTES_PARAM=Param\u00e9trages
+fonctionnalite.parametrage.NOTES_PUBLIPOST=Publipostage
+fonctionnalite.parametrage.NOTES_EXPORT=Export
+
+scolarite.parametrage.fonctionnalite.fonction.modifieSucces=Fonctions enregistrés avec succès.
+scolarite.parametrage.fonctionnalite.fonction.modifieEchec=La modification des fonctionnalités par fonctions a échoué.
+
+scolarite.parametrage.fonctionnalite.utilisateur.modifieSucces=Utilisateur enregistrés avec succès.
import org.lilie.services.eliot.scolarite.fonctionnalites.ScolariteFonctionnalite
import org.lilie.services.eliot.fonctionnalites.EliotFonctionnalite
-import org.lilie.services.eliot.absences.PreferencesEtablissementAbsences
-import org.lilie.services.eliot.securite.AutorisationException
import org.lilie.services.eliot.droits.EliotDroitsService
import org.lilie.services.eliot.annuaire.SecuriteSession
import org.lilie.services.eliot.annuaire.FonctionEnum
import org.lilie.services.eliot.scolarite.etablissement.PreferenceEtablissementService
import org.codehaus.groovy.grails.commons.GrailsApplication
import org.codehaus.groovy.grails.commons.ConfigurationHolder
+import org.lilie.services.eliot.annuaire.EliotFonctionnalites
+/**
+ *
+ * @author othe
+ */
class DroitsService extends EliotDroitsService {
static transactional = true
@SuppressWarnings('GrailsStatelessService')
GrailsApplication grailsApplication
+ //TOIMPL: à retirer droit accès à la page de maintenance pour le directeur
+ public List<EliotFonctionnalites> findAllFonctionnalite(SecuriteSession securiteSession,
+ Etablissement etablissementCourant
+ ) {
+
+ Set<EliotFonctionnalites> allFonctionnalite = securiteSession.allFonctionnalite(etablissementCourant.id)
+
+ boolean directeur = securiteSession.hasFonctionIn(
+ [FonctionEnum.DIRECTION],
+ etablissementCourant.id
+ )
+
+ if (directeur) {
+ ScolariteFonctionnalites.each {
+ allFonctionnalite << it
+ }
+ }
+
+ return allFonctionnalite.toList()
+ }
+
+ public Boolean accesFonctionnalite(SecuriteSession securiteSession,
+ Etablissement etablissement,
+ String codeFonctionnalite) {
+
+ List<EliotFonctionnalites> allEliotFonctionnalites = findAllFonctionnalite(securiteSession, etablissement)
+
+ Boolean resultat = (Boolean) allEliotFonctionnalites.find {
+ it.code == codeFonctionnalite
+ }
+
+ return resultat
+
+ }
+
+
private Boolean isDirectionAdminLocalOuCorrespondant(SecuriteSession securiteSession,
Etablissement etablissement) {
return (
}
- public Boolean getDroitFonctionnalite(SecuriteSession securiteSession,
- Etablissement etablissement,
- EliotFonctionnalite fonctionnalite) {
- switch (fonctionnalite) {
-
- case ScolariteFonctionnalite.PARAMETRAGE_NOTIFICATION:
- return securiteSession.hasFonctionIn([FonctionEnum.DIRECTION])
-
-
- case ScolariteFonctionnalite.SYNCHRO_EDT:
- return isDirectionAdminLocalCorrespondantOuEducation(
- securiteSession,
- etablissement
- )
-
- case ScolariteFonctionnalite.PARAMETRAGE_CALENDRIER_ANNUEL:
- return isDirectionAdminLocalCorrespondantOuEducation(
- securiteSession,
- etablissement
- )
-
- case ScolariteFonctionnalite.PARAMETRAGE_CALENDRIER_HEBDO:
- return isDirectionAdminLocalCorrespondantOuEducation(
- securiteSession,
- etablissement
- )
-
- case ScolariteFonctionnalite.PARAMETRAGE_MODELE_DOCUMENT:
- return isDirectionAdminLocalCorrespondantOuEducation(
- securiteSession,
- etablissement
- )
-
- case ScolariteFonctionnalite.PARAMETRAGE_NIVEAU:
- return isDirectionAdminLocalOuCorrespondant(
- securiteSession,
- etablissement
- )
-
- case ScolariteFonctionnalite.PARAMETRAGE_MATIERES:
- return isDirectionAdminLocalOuCorrespondant(
- securiteSession,
- etablissement
- )
-
- case ScolariteFonctionnalite.PARAMETRAGE_LIAISON_SSO_VIE_SCOLAIRE:
- return (
- grailsApplication.config.eliot.accesLvs.active &&
- isDirectionAdminLocalCorrespondantOuEducation(
- securiteSession,
- etablissement
- ))
-
- case ScolariteFonctionnalite.PARAMETRAGE_LIAISON_SSO_MAGISTER:
- return (
- grailsApplication.config.eliot.accesMagister.active &&
- isDirectionAdminLocalCorrespondantOuEducation(
- securiteSession,
- etablissement
- ))
-
- case ScolariteFonctionnalite.PARAMETRAGE_TYPES_ACTIVITES_DEVOIRS:
- return isDirectionAdminLocalOuCorrespondant(
- securiteSession,
- etablissement
- )
-
- case ScolariteFonctionnalite.VIE_SCOLAIRE:
- return preferenceEtablissementService.isLiaisonVieScolaireActive(
- etablissement
- )
-
- case ScolariteFonctionnalite.MAGISTERE:
- return preferenceEtablissementService.isLiaisonMagisterActive(
- etablissement
- )
-
- case ScolariteFonctionnalite.NOTIFICATION_PREFERNCE_UTILISATEUR:
- return hasNotificationPreferenceUtilisateur(
- securiteSession,
- etablissement
- )
-
- default: return false
- }
- }
protected Boolean hasNotificationPreferenceUtilisateur(SecuriteSession securiteSession,
Etablissement etablissement) {
* @param securiteSession : la session de sécurité
* @return true si l'utilisateur peut modifier le paramétrage, faux sinon
*/
- public Boolean getDroitModificationParam(PreferencesEtablissementAbsences pref,
- SecuriteSession securiteSession
- ) {
- return securiteSession.hasFonctionIn(
- [
- FonctionEnum.EDUCATION,
- FonctionEnum.DIRECTION
- ],
- pref.etablissement.id
- )
- }
-
- /**
- * Vérification des droits associés à la modification des paramètres
- * @throws AutorisationException
- */
- protected verificationDroitModificationParam(PreferencesEtablissementAbsences pref,
- SecuriteSession securiteSession) {
- if (!getDroitModificationParam(
- pref,
- securiteSession)
- ) {
- throw AutorisationException.modificationContenuException()
- }
- }
-
+// public Boolean getDroitModificationParam(PreferencesEtablissementAbsences pref,
+// SecuriteSession securiteSession
+// ) {
+// return securiteSession.hasFonctionIn(
+// [
+// FonctionEnum.EDUCATION,
+// FonctionEnum.DIRECTION
+// ],
+// pref.etablissement.id
+// )
+// }
}
SecuriteSession securiteSession = SessionUtils.securiteSession(session)
Long etabId = securiteSession.etablissementCourant.id
- Boolean accesOk = false
-
if (!securiteSession.defaultAutorite.aUnAccesRetreint()) {
- accesOk = (securiteSession.hasFonctionIn(
- [
- FonctionEnum.EDUCATION,
- FonctionEnum.ADMIN_LOCAL,
- FonctionEnum.DIRECTION
- ],
- etabId
- ) ||
- securiteSession.hasFonctionIn([FonctionEnum.CORRESPONDANT_DEPLOIEMENT])
- )
- }
- if (!accesOk) {
- log.warn(
- "La session ${securiteSession} n'est pas autorisée à accéder " +
- "à l'application eliot-scolarite"
- )
+
+ if (securiteSession.hasFonctionIn(
+ [
+ FonctionEnum.DIRECTION
+ ],etabId)) {
+ return true
+ }
+
+ if (securiteSession.allFonctionnalite(etabId).size()>0){
+ log.debug "Autorisation accordée par les fonctionnalités paramétrables."
+ return true
+
+ }
+
}
- return accesOk
+ log.warn(
+ "La session ${securiteSession} n'est pas autorisée à accéder " +
+ "à l'application eliot-scolarite"
+ )
+
+ return false
}
}
import org.lilie.services.eliot.fonctionnalites.EliotFonctionnalite
public enum ScolariteFonctionnalite implements EliotFonctionnalite {
+ PARAMETRAGE_ACCES_FONCTIONS,
PARAMETRAGE_NIVEAU,
PARAMETRAGE_MATIERES,
PARAMETRAGE_CALENDRIER_HEBDO,
+++ /dev/null
-/*
- * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
- * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
- *
- * Lilie is free software. You can redistribute it and/or modify since
- * you respect the terms of either (at least one of the both license) :
- * - under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- * - the CeCILL-C as published by CeCILL-C; either version 1 of the
- * License, or any later version
- *
- * There are special exceptions to the terms and conditions of the
- * licenses as they are applied to this software. View the full text of
- * the exception in file LICENSE.txt in the directory of this software
- * distribution.
- *
- * Lilie is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * Licenses for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the CeCILL-C along with Lilie. If not, see :
- * <http://www.gnu.org/licenses/> and
- * <http://www.cecill.info/licences.fr.html>.
- */
-
-package org.lilie.services.eliot.scolarite.menu
-
-import org.lilie.services.eliot.scolarite.page.Page
-import org.lilie.services.eliot.scolarite.fonctionnalites.ScolariteFonctionnalite
-
-/**
- * Décrit les items de menu
- * @author jbui
- */
-public enum MenuItemInfoEnum {
- SYNCHRO_EDT(
- 'eliot.scolarite.menu.emploiDuTemps.titrePrincipal',
- 'gestionSynchroEdt',
- 'index',
- '',
- {
- pageCourante, notificationActif ->
- Page.IMPORT_STS == pageCourante
- },
- {
- Set<ScolariteFonctionnalite> allFonctionnaliteAccessible ->
- return false
- }
- ),
- PARAMETRAGE_TITRE_PRINCIPAL(
- 'eliot.scolarite.menu.parametrages.titrePrincipal',
- '',
- '',
- '',
- {
- pageCourante, notificationActif ->
- ((Page.PARAMETRAGE_NIVEAU == pageCourante) ||
- (Page.PARAMETRAGE_MATIERES == pageCourante) ||
- (Page.PARAMETRAGE_CALENDRIER_HEBDO == pageCourante) ||
- (Page.PARAMETRAGE_CALENDRIER_ANNUEL == pageCourante) ||
- (Page.PARAMETRAGE_ACCES_VIE_SCOLAIRE == pageCourante) ||
- (notificationActif && (Page.PARAMETRAGE_NOTIFICATION == pageCourante)))
- },
- {
- Set<ScolariteFonctionnalite> allFonctionnaliteAccessible ->
- return true
- }
- ),
- PARAMETRAGE_NIVEAU(
- 'eliot.scolarite.menu.parametrages.niveau',
- 'niveauParametrage',
- 'index',
- 'menuitem',
- {
- pageCourante, notificationActif ->
- Page.PARAMETRAGE_NIVEAU == pageCourante
- },
- {
- Set<ScolariteFonctionnalite> allFonctionnaliteAccessible ->
- return allFonctionnaliteAccessible.contains(
- ScolariteFonctionnalite.PARAMETRAGE_NIVEAU
- )
- }
- ),
- PARAMETRAGE_MATIERE(
- 'eliot.scolarite.menu.parametrages.matieres',
- 'parametragesMatieres',
- 'index',
- 'menuitem',
- {
- pageCourante, notificationActif ->
- Page.PARAMETRAGE_MATIERES == pageCourante
- },
- {
- Set<ScolariteFonctionnalite> allFonctionnaliteAccessible ->
- return allFonctionnaliteAccessible.contains(
- ScolariteFonctionnalite.PARAMETRAGE_MATIERES
- )
- }
- ),
- PARAMETRAGE_TYPES_ACTIVITES_DEVOIRS(
- 'eliot.scolarite.menu.parametrages.typesActivitesDevoirs.titrePrincipal',
- 'typesActivitesDevoirs',
- 'index',
- 'menuitem',
- {
- pageCourante, notificationActif ->
- Page.PARAMETRAGE_TYPES_ACTIVITES_DEVOIRS == pageCourante
- },
- {
- Set<ScolariteFonctionnalite> allFonctionnaliteAccessible ->
- return allFonctionnaliteAccessible.contains(
- ScolariteFonctionnalite.PARAMETRAGE_TYPES_ACTIVITES_DEVOIRS
- )
- }
- ),
- PARAMETRAGE_CALENDRIER_HEBDO(
- 'eliot.scolarite.menu.parametrages.calendrierHebdo.titrePrincipal',
- 'parametrageCalendrierHebdo',
- 'index',
- 'menuitem',
- {
- pageCourante, notificationActif ->
- Page.PARAMETRAGE_CALENDRIER_HEBDO == pageCourante
- },
- {
- Set<ScolariteFonctionnalite> allFonctionnaliteAccessible ->
- return allFonctionnaliteAccessible.contains(
- ScolariteFonctionnalite.PARAMETRAGE_CALENDRIER_HEBDO
- )
- }
- ),
- PARAMETRAGE_CALENDRIER_ANNUEL(
- 'eliot.scolarite.menu.parametrages.calendrierAnnuel.titrePrincipal',
- 'parametrageCalendrierAnnuel',
- 'index',
- 'menuitem',
- {
- pageCourante, notificationActif ->
- Page.PARAMETRAGE_CALENDRIER_ANNUEL == pageCourante
- },
- {
- Set<ScolariteFonctionnalite> allFonctionnaliteAccessible ->
- return allFonctionnaliteAccessible.contains(
- ScolariteFonctionnalite.PARAMETRAGE_CALENDRIER_ANNUEL
- )
- }
- ),
- PARAMETRAGE_MODELE_DOCUMENT(
- 'eliot.scolarite.menu.parametrages.modeleDeDocument.titrePrincipal',
- 'impressionEdition',
- 'index',
- 'menuitem',
- {
- pageCourante, notificationActif ->
- Page.PARAMETRAGE_MODELE_DOCUMENT == pageCourante
- },
- {
- Set<ScolariteFonctionnalite> allFonctionnaliteAccessible ->
- return allFonctionnaliteAccessible.contains(
- ScolariteFonctionnalite.PARAMETRAGE_MODELE_DOCUMENT
- )
- }
- ),
- PARAMETRAGE_ACCES_VIE_SCOLAIRE(
- 'eliot.scolarite.menu.parametrages.accesVieScolaire.titrePrincipal',
- 'accesVieScolaire',
- 'index',
- 'menuitem',
- {
- pageCourante, notificationActif ->
- Page.PARAMETRAGE_ACCES_VIE_SCOLAIRE == pageCourante
- },
- {
- Set<ScolariteFonctionnalite> allFonctionnaliteAccessible ->
- return allFonctionnaliteAccessible.contains(
- ScolariteFonctionnalite.PARAMETRAGE_LIAISON_SSO_VIE_SCOLAIRE
- ) ||
- allFonctionnaliteAccessible.contains(
- ScolariteFonctionnalite.PARAMETRAGE_LIAISON_SSO_MAGISTER
- )
- }
- ),
- PARAMETRAGE_NOTIFICATION(
- 'eliot.scolarite.menu.parametrages.notification',
- 'notificationParametrage',
- 'index',
- 'menuitem',
- {
- pageCourante, notificationActif ->
- Page.PARAMETRAGE_NOTIFICATION == pageCourante
- },
- {
- Set<ScolariteFonctionnalite> allFonctionnaliteAccessible ->
- return allFonctionnaliteAccessible.contains(
- ScolariteFonctionnalite.PARAMETRAGE_NOTIFICATION
- )
- }
- )
-
- private String codeLabel
- private String controleur
- private String action
- private String menuType
- private Closure selectionne
- private Closure accessible
-
- private MenuItemInfoEnum() {}
-
- private MenuItemInfoEnum(String codeLabel,
- String controleur,
- String action,
- String menuType,
- Closure isSelectionne,
- Closure isAccessible) {
- this.codeLabel = codeLabel
- this.controleur = controleur
- this.action = action
- this.menuType = menuType
- this.selectionne = isSelectionne
- this.accessible = isAccessible
- }
-
- /**
- * @return une map permettant d'initialiser l'objet MenuItemInfo
- */
- Map getMapInitialisation() {
- return [
- codeLabel: this.codeLabel,
- controleur: this.controleur,
- action: this.action,
- menuType: this.menuType
- ]
- }
-
- /**
- * @param pageCourante
- * @param notificationActif
- * @return l'état "sélectionné" de l'item en fonction de la page courant
- * et de l'état d'activation des notifications
- */
- Boolean isSelectionne(def pageCourante, Boolean notificationActif) {
- return this.selectionne(pageCourante, notificationActif)
- }
-
- Boolean isAccessible(Set<ScolariteFonctionnalite> allFonctionnaliteAccessible) {
- this.accessible(allFonctionnaliteAccessible) as Boolean
- }
-}
\ No newline at end of file
+++ /dev/null
-/*
- * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
- * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
- *
- * Lilie is free software. You can redistribute it and/or modify since
- * you respect the terms of either (at least one of the both license) :
- * - under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- * - the CeCILL-C as published by CeCILL-C; either version 1 of the
- * License, or any later version
- *
- * There are special exceptions to the terms and conditions of the
- * licenses as they are applied to this software. View the full text of
- * the exception in file LICENSE.txt in the directory of this software
- * distribution.
- *
- * Lilie is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * Licenses for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the CeCILL-C along with Lilie. If not, see :
- * <http://www.gnu.org/licenses/> and
- * <http://www.cecill.info/licences.fr.html>.
- */
-
-package org.lilie.services.eliot.scolarite.menu
-
-import org.lilie.services.eliot.menu.MenuInfo
-import org.lilie.services.eliot.menu.MenuItemInfo
-import org.lilie.services.eliot.scolarite.Etablissement
-import org.lilie.services.eliot.scolarite.fonctionnalites.ScolariteFonctionnalite
-import org.lilie.services.eliot.menu.EtablissementMenuItemInfo
-import org.lilie.services.eliot.scolarite.DroitsService
-import org.lilie.services.eliot.scolarite.page.Page
-import org.lilie.services.eliot.annuaire.SecuriteSession
-import org.lilie.services.eliot.sso.viescolaire.LiaisonSSOLvsService
-import org.lilie.services.eliot.sso.magistere.LiaisonSSOMagisterService
-import org.codehaus.groovy.grails.commons.GrailsApplication
-
-/**
- * Permet d'obtenir les informations de construction du menu pour la session
- * courante.
- * @author othe
- * @author ywan
- */
-class MenuService {
-
- DroitsService droitsService
- LiaisonSSOLvsService liaisonSSOLvsService
- LiaisonSSOMagisterService liaisonSSOMagisterService
-
- @SuppressWarnings('GrailsStatelessService')
- GrailsApplication grailsApplication
-
- /**
- * Retourne les informations de construction du menu
- * @param pageCourante la page courante
- * @param securiteSession la session de sécurité Eliot de l'utilisateur
- * @return
- */
- MenuInfo getMenuInfo(SecuriteSession securiteSession,
- Object pageCourante,
- Etablissement etablissementCourant) {
-
- MenuInfo menuInfo = new MenuInfo()
-
- Set fonctionnalitesAccessibles = droitsService.getFonctionnalitesAccessibles(
- securiteSession,
- etablissementCourant
- )
-
- construisMenuGestionSynchro(fonctionnalitesAccessibles, menuInfo, pageCourante)
-
- construisMenuParametrage(fonctionnalitesAccessibles, menuInfo, pageCourante)
-
- construisMenuLVS(
- fonctionnalitesAccessibles,
- menuInfo,
- pageCourante,
- securiteSession,
- etablissementCourant)
-
- construisMenuMagister(
- fonctionnalitesAccessibles,
- menuInfo,
- pageCourante,
- securiteSession,
- etablissementCourant)
-
-
- EtablissementMenuItemInfo menuEtab = new EtablissementMenuItemInfo(
- securiteSession,
- etablissementCourant,
- 'eliot.scolarite.menu.etablissements.titrePrincipal',
- pageCourante
- )
-
- if (!menuEtab.isEmpty()) {
- menuInfo.items << menuEtab
- }
-
- return menuInfo
- }
-
- MenuItemInfoFactory getMenuItemFactory(def pageCourante) {
- return new MenuItemInfoFactory(
- pageCourante,
- grailsApplication.config.eliot.notification.actif
- )
- }
-
- /**
- * Construis le menu de la Gestion Synchro
- * @param fonctionnalitesAccessibles
- * @param menuInfo
- * @param pageCourante
- */
- void construisMenuGestionSynchro(Set fonctionnalitesAccessibles, MenuInfo menuInfo,
- Object pageCourante) {
- if (fonctionnalitesAccessibles.contains(ScolariteFonctionnalite.SYNCHRO_EDT)) {
- menuInfo.items << getMenuItemFactory(pageCourante).getMenuItemInfo(
- MenuItemInfoEnum.SYNCHRO_EDT)
- }
- }
-
- /**
- * Construis le menu de parametrage
- * @param allFonctionnaliteAccessible
- * @param menuInfo
- * @param pageCourante
- */
- void construisMenuParametrage(Set allFonctionnaliteAccessible,
- MenuInfo menuInfo,
- Object pageCourante) {
-
- List allFonctionnaliteParametrage = [
- ScolariteFonctionnalite.PARAMETRAGE_CALENDRIER_ANNUEL,
- ScolariteFonctionnalite.PARAMETRAGE_CALENDRIER_HEBDO,
- ScolariteFonctionnalite.PARAMETRAGE_NIVEAU,
- ScolariteFonctionnalite.PARAMETRAGE_MATIERES,
- ScolariteFonctionnalite.PARAMETRAGE_LIAISON_SSO_VIE_SCOLAIRE,
- ScolariteFonctionnalite.PARAMETRAGE_TYPES_ACTIVITES_DEVOIRS
- ]
-
- if (!allFonctionnaliteAccessible.intersect(allFonctionnaliteParametrage)) {
- return // L'utilisateur n'a pas accès au paramétrage
- }
-
- Boolean notificationActif = grailsApplication.config.eliot.notification.actif
- if (!notificationActif) {
- allFonctionnaliteAccessible -= ScolariteFonctionnalite.PARAMETRAGE_NOTIFICATION
- }
-
- MenuItemInfoFactory menuItemInfoFactory = getMenuItemFactory(pageCourante)
-
- MenuItemInfo parametrages = menuItemInfoFactory.getMenuItemInfo(
- MenuItemInfoEnum.PARAMETRAGE_TITRE_PRINCIPAL
- )
-
- menuInfo.items << parametrages
-
- // Ajout des sous-menus
- [
- MenuItemInfoEnum.PARAMETRAGE_NIVEAU,
- MenuItemInfoEnum.PARAMETRAGE_MATIERE,
- MenuItemInfoEnum.PARAMETRAGE_TYPES_ACTIVITES_DEVOIRS,
- MenuItemInfoEnum.PARAMETRAGE_CALENDRIER_HEBDO,
- MenuItemInfoEnum.PARAMETRAGE_CALENDRIER_ANNUEL,
- MenuItemInfoEnum.PARAMETRAGE_MODELE_DOCUMENT,
- MenuItemInfoEnum.PARAMETRAGE_ACCES_VIE_SCOLAIRE,
- MenuItemInfoEnum.PARAMETRAGE_NOTIFICATION
- ].each { MenuItemInfoEnum menuItemInfoEnum ->
- if (menuItemInfoEnum.isAccessible(allFonctionnaliteAccessible)) {
- parametrages.items << menuItemInfoFactory.getMenuItemInfo(
- menuItemInfoEnum
- )
- }
- }
- }
-
- /**
- * Construis le menu de LVS
- * @param fonctionnalitesAccessibles
- * @param menuInfo
- * @param pageCourante
- * @param securiteSession
- * @param etablissementCourant
- */
- void construisMenuLVS(Set fonctionnalitesAccessibles, MenuInfo menuInfo,
- Object pageCourante, SecuriteSession securiteSession,
- Etablissement etablissementCourant) {
- // Vie scolaire
- if (fonctionnalitesAccessibles.contains(ScolariteFonctionnalite.VIE_SCOLAIRE)) {
- menuInfo.items << new MenuItemInfo(
- codeLabel: 'eliot.scolarite.menu.vieScolaire.titrePrincipal',
- url: liaisonSSOLvsService.getLvsUrlCrypte(securiteSession, etablissementCourant),
- nouvelOnglet: true,
- selectionne: (Page.VIE_SCOLAIRE == pageCourante)
- )
- }
- }
-
- /**
- * Construis le menu de Magister
- * @param fonctionnalitesAccessibles
- * @param menuInfo
- * @param pageCourante
- * @param securiteSession
- * @param etablissementCourant
- */
- void construisMenuMagister(Set fonctionnalitesAccessibles, MenuInfo menuInfo,
- Object pageCourante, SecuriteSession securiteSession,
- Etablissement etablissementCourant) {
- if (fonctionnalitesAccessibles.contains(ScolariteFonctionnalite.MAGISTERE)) {
- menuInfo.items << new MenuItemInfo(
- codeLabel: 'eliot.scolarite.menu.magistere.titrePrincipal',
- url: liaisonSSOMagisterService.getUrl(securiteSession, etablissementCourant),
- nouvelOnglet: true,
- selectionne: (Page.MAGISTERE == pageCourante)
- )
- }
- }
-
-}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+package org.lilie.services.eliot.scolarite.menu.description
+
+import org.lilie.services.eliot.scolarite.page.Page
+import org.lilie.services.eliot.scolarite.ScolariteFonctionnalites
+import org.lilie.services.eliot.annuaire.EliotFonctionnalites
+import org.lilie.services.eliot.menu.MenuEtablissement
+import org.lilie.services.eliot.menu.Entete
+
+/**
+ * Description des entêtes de menu
+ */
+public enum MenuEntete implements Entete{
+
+ SYNCHRO_EDT(
+ 'eliot.scolarite.menu.emploiDuTemps.titrePrincipal',
+ 'gestionSynchroEdt',
+ 'index',
+ '',
+ Page.IMPORT_STS,
+ ScolariteFonctionnalites.SCOL_EDT
+
+ ),
+
+ PARAMETRAGE_TITRE_PRINCIPAL(
+ 'eliot.scolarite.menu.parametrages.titrePrincipal',
+ '',
+ '',
+ '',
+ null,
+ ScolariteFonctionnalites.SCOL_PARAM
+ ),
+
+ ETABLISSEMENT(
+ '',
+ '',
+ '',
+ '',
+ null,
+ ScolariteFonctionnalites.ETABLISSEMENT,
+ MenuEtablissement
+ )
+
+ public String codeLabel
+ public String controleur
+ public String action
+ public String menuType
+ public Object page
+ public EliotFonctionnalites fonctionnalite
+ public Class menuSpecial
+
+ private MenuEntete() {}
+
+ private MenuEntete(String codeLabel,
+ String controleur,
+ String action,
+ String menuType,
+ Object page,
+ EliotFonctionnalites fonctionnalite,
+ Class menuSpecial = null) {
+ this.codeLabel = codeLabel
+ this.controleur = controleur
+ this.action = action
+ this.menuType = menuType
+ this.page = page
+ this.fonctionnalite = fonctionnalite
+ this.menuSpecial=menuSpecial
+ }
+
+ /**
+ * @param pageCourante
+ * @param notificationActif
+ * @return l'état "sélectionné" de l'item en fonction de la page courant
+ * et de l'état d'activation des notifications
+ */
+ Boolean isSelectionne(def pageCourante) {
+ return (pageCourante == this.page)
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+package org.lilie.services.eliot.scolarite.menu.description
+
+import org.lilie.services.eliot.scolarite.page.Page
+import org.lilie.services.eliot.scolarite.ScolariteFonctionnalites
+import org.lilie.services.eliot.scolarite.menu.special.SousMenuMagister
+import org.lilie.services.eliot.annuaire.EliotFonctionnalites
+import org.lilie.services.eliot.scolarite.menu.special.SousMenuLVS
+import org.lilie.services.eliot.scolarite.menu.special.SousMenuNotification
+import org.lilie.services.eliot.menu.SousMenu
+
+/**
+ * Décrit les items de menu
+ * @author jbui
+ * @author othe
+ * TOREFACT : réordonner items
+ */
+public enum MenuSousMenu implements SousMenu{
+
+ PARAMETRAGE_ACCES_FONCTIONS(
+ 'eliot.scolarite.menu.parametrages.accesfonction',
+ 'parametrageAccesFonctionnalite',
+ 'index',
+ Page.PARAMETRAGE_ACCES_FONCTIONS,
+ ScolariteFonctionnalites.PARAMETRAGE_ACCES_FONCTIONS,
+ MenuEntete.PARAMETRAGE_TITRE_PRINCIPAL
+ ),
+ PARAMETRAGE_CALENDRIER_HEBDO(
+ 'eliot.scolarite.menu.parametrages.calendrierHebdo.titrePrincipal',
+ 'parametrageCalendrierHebdo',
+ 'index',
+ Page.PARAMETRAGE_CALENDRIER_HEBDO,
+ ScolariteFonctionnalites.SCOL_PARAM_CAL_HEBDO_ANNU,
+ MenuEntete.PARAMETRAGE_TITRE_PRINCIPAL
+ ),
+ PARAMETRAGE_CALENDRIER_ANNUEL(
+ 'eliot.scolarite.menu.parametrages.calendrierAnnuel.titrePrincipal',
+ 'parametrageCalendrierAnnuel',
+ 'index',
+ Page.PARAMETRAGE_CALENDRIER_ANNUEL,
+ ScolariteFonctionnalites.SCOL_PARAM_CAL_HEBDO_ANNU,
+ MenuEntete.PARAMETRAGE_TITRE_PRINCIPAL
+ ),
+ PARAMETRAGE_MATIERE(
+ 'eliot.scolarite.menu.parametrages.matieres',
+ 'parametragesMatieres',
+ 'index',
+ Page.PARAMETRAGE_MATIERES,
+ ScolariteFonctionnalites.SCOL_PARAM_MATIERES,
+ MenuEntete.PARAMETRAGE_TITRE_PRINCIPAL
+ ),
+ PARAMETRAGE_NIVEAU(
+ 'eliot.scolarite.menu.parametrages.niveau',
+ 'niveauParametrage',
+ 'index',
+ Page.PARAMETRAGE_NIVEAU,
+ ScolariteFonctionnalites.SCOL_PARAM_NIV,
+ MenuEntete.PARAMETRAGE_TITRE_PRINCIPAL
+ ),
+ PARAMETRAGE_TYPES_ACTIVITES_DEVOIRS(
+ 'eliot.scolarite.menu.parametrages.typesActivitesDevoirs.titrePrincipal',
+ 'typesActivitesDevoirs',
+ 'index',
+ Page.PARAMETRAGE_TYPES_ACTIVITES_DEVOIRS,
+ ScolariteFonctionnalites.SCOL_PARAM_TYP_ACT_DEV,
+ MenuEntete.PARAMETRAGE_TITRE_PRINCIPAL
+ ),
+ PARAMETRAGE_MODELE_DOCUMENT(
+ 'eliot.scolarite.menu.parametrages.modeleDeDocument.titrePrincipal',
+ 'impressionEdition',
+ 'index',
+ Page.PARAMETRAGE_MODELE_DOCUMENT,
+ ScolariteFonctionnalites.SCOL_PARAM_MODELES_DOC,
+ MenuEntete.PARAMETRAGE_TITRE_PRINCIPAL
+ ),
+ PARAMETRAGE_ACCES_VIE_SCOLAIRE(
+ 'eliot.scolarite.menu.parametrages.accesVieScolaire.titrePrincipal',
+ 'accesVieScolaire',
+ 'index',
+ Page.PARAMETRAGE_ACCES_VIE_SCOLAIRE,
+ ScolariteFonctionnalites.PARAMETRAGE_LIAISON_SSO,
+ MenuEntete.PARAMETRAGE_TITRE_PRINCIPAL,
+ SousMenuLVS
+ ),
+ PARAMETRAGE_NOTIFICATION(
+ 'eliot.scolarite.menu.parametrages.notification',
+ 'notificationParametrage',
+ 'index',
+ Page.PARAMETRAGE_NOTIFICATION,
+ ScolariteFonctionnalites.PARAMETRAGE_NOTIFICATION,
+ MenuEntete.PARAMETRAGE_TITRE_PRINCIPAL,
+ SousMenuNotification
+ ),
+ MAGISTER(
+ '',
+ '',
+ '',
+ Page.MAGISTERE,
+ ScolariteFonctionnalites.MAGISTER,
+ MenuEntete.PARAMETRAGE_TITRE_PRINCIPAL,
+ SousMenuMagister
+ )
+
+
+ public String codeLabel
+ public String controleur
+ public String action
+ public Object page
+ public EliotFonctionnalites fonctionnalite
+ public MenuEntete menuEnteteEnum
+ public Class menuSpecial
+
+ private MenuSousMenu() {}
+
+ private MenuSousMenu(String codeLabel,
+ String controleur,
+ String action,
+ Object page,
+ EliotFonctionnalites fonctionnalite,
+ MenuEntete menuEnteteEnum,
+ Class menuSpecial = null
+ ) {
+ this.codeLabel = codeLabel
+ this.controleur = controleur
+ this.action = action
+ this.page = page
+ this.fonctionnalite = fonctionnalite
+ this.menuEnteteEnum = menuEnteteEnum
+ this.menuSpecial = menuSpecial
+ }
+
+ /**
+ * @param pageCourante
+ * @param notificationActif
+ * @return l'état "sélectionné" de l'item en fonction de la page courant
+ * et de l'état d'activation des notifications
+ */
+ Boolean isSelectionne(def pageCourante) {
+ return (pageCourante == this.page)
+
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+package org.lilie.services.eliot.scolarite.menu.special
+
+import org.lilie.services.eliot.menu.MenuItemInfo
+import org.lilie.services.eliot.scolarite.page.Page
+import org.lilie.services.eliot.sso.viescolaire.LiaisonSSOLvsService
+import org.lilie.services.eliot.scolarite.etablissement.PreferenceEtablissementService
+import org.lilie.services.eliot.menu.AbstractMenu
+
+class SousMenuLVS extends AbstractMenu {
+
+ LiaisonSSOLvsService liaisonSSOLvsService
+ PreferenceEtablissementService preferenceEtablissementService
+
+ public void initialise() {
+ liaisonSSOLvsService =
+ (LiaisonSSOLvsService) applicationContext.getBean("liaisonSSOLvsService")
+
+ preferenceEtablissementService =
+ (PreferenceEtablissementService) applicationContext.getBean("preferenceEtablissementService")
+
+ }
+
+ public Boolean autoriseAjoutElementMenu() {
+
+ preferenceEtablissementService.isLiaisonVieScolaireActive(
+ etablissement
+ )
+
+ }
+
+
+ public MenuItemInfo construitMenuItem(Object pageCourante) {
+
+ return new MenuItemInfo(
+ codeLabel: 'eliot.scolarite.menu.vieScolaire.titrePrincipal',
+ url: liaisonSSOLvsService.getLvsUrlCrypte(securiteSession, etablissement),
+ nouvelOnglet: true,
+ selectionne: (Page.VIE_SCOLAIRE == menuItemInfoEnum.page),
+ menuType: 'menuitem'
+ )
+
+ }
+
+
+}
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+
+
+package org.lilie.services.eliot.scolarite.menu.special
+
+import org.lilie.services.eliot.menu.MenuItemInfo
+import org.lilie.services.eliot.scolarite.page.Page
+import org.lilie.services.eliot.sso.magistere.LiaisonSSOMagisterService
+import org.lilie.services.eliot.scolarite.etablissement.PreferenceEtablissementService
+import org.lilie.services.eliot.menu.AbstractMenu
+
+class SousMenuMagister extends AbstractMenu {
+
+ LiaisonSSOMagisterService liaisonSSOMagisterService
+ PreferenceEtablissementService preferenceEtablissementService
+
+ public void initialise() {
+
+ liaisonSSOMagisterService =
+ (LiaisonSSOMagisterService) applicationContext.getBean("liaisonSSOMagisterService")
+
+ preferenceEtablissementService =
+ (PreferenceEtablissementService) applicationContext.getBean("preferenceEtablissementService")
+
+ }
+
+ public Boolean autoriseAjoutElementMenu() {
+
+ preferenceEtablissementService.isLiaisonMagisterActive(etablissement)
+
+ }
+
+ public MenuItemInfo construitMenuItem(Object pageCourante) {
+
+ String url = liaisonSSOMagisterService.getUrl(securiteSession, etablissement)
+
+ return new MenuItemInfo(
+ codeLabel: 'eliot.scolarite.menu.magistere.titrePrincipal',
+ url: url ? url : "",
+ nouvelOnglet: true,
+ selectionne: (Page.MAGISTERE == menuItemInfoEnum.page),
+ menuType: 'menuitem'
+ )
+
+ }
+
+
+}
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+
+
+package org.lilie.services.eliot.scolarite.menu.special
+
+
+import org.lilie.services.eliot.menu.SousMenuNormal
+
+class SousMenuNotification extends SousMenuNormal {
+
+ public Boolean autoriseAjoutElementMenu() {
+ def cfg = applicationContext.getBean("grailsApplication")
+ cfg.config.eliot.notification.actif
+ }
+
+}
--- /dev/null
+%{--
+ - Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ - This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ -
+ - Lilie is free software. You can redistribute it and/or modify since
+ - you respect the terms of either (at least one of the both license) :
+ - - under the terms of the GNU Affero General Public License as
+ - published by the Free Software Foundation, either version 3 of the
+ - License, or (at your option) any later version.
+ - - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ - License, or any later version
+ -
+ - There are special exceptions to the terms and conditions of the
+ - licenses as they are applied to this software. View the full text of
+ - the exception in file LICENSE.txt in the directory of this software
+ - distribution.
+ -
+ - Lilie is distributed in the hope that it will be useful,
+ - but WITHOUT ANY WARRANTY; without even the implied warranty of
+ - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ - Licenses for more details.
+ -
+ - You should have received a copy of the GNU General Public License
+ - and the CeCILL-C along with Lilie. If not, see :
+ - <http://www.gnu.org/licenses/> and
+ - <http://www.cecill.info/licences.fr.html>.
+ --}%
+
+
+<g:javascript>
+ <eliotjs:ns name="eliot.scolarite.parametrage.accesfonction.ConfigServeur">
+
+ <eliotjs:ns name="url">
+ <eliotjs:varLink name="getFonctionsParametrage"
+ action="getFonctionsParametrage"
+ controller="parametrageAccesFonctionnalite"/>
+ <eliotjs:varLink name="enregistreFonctionsParam"
+ action="enregistreFonctionsParam"
+ controller="parametrageAccesFonctionnalite"/>
+
+ <eliotjs:varLink name="getUtilisateurParametrage"
+ action="getUtilisateurParametrage"
+ controller="parametrageAccesFonctionnalite"/>
+ <eliotjs:varLink name="enregistreUtilisateurParam"
+ action="enregistreUtilisateurParam"
+ controller="parametrageAccesFonctionnalite"/>
+ </eliotjs:ns>
+
+ <eliotjs:ns name="libelle">
+ <eliotjs:varI18n name="enregistrer"
+ code="eliot.scolarite.messages.enregistrer"/>
+ <eliotjs:varI18n name="annuler" code="eliot.scolarite.messages.annuler"/>
+ <eliotjs:varI18n name="utilisateur" code="eliot.libelle.utilisateur"/>
+ <eliotjs:varI18n name="fonctions" code="eliot.libelle.fonctions"/>
+ <eliotjs:varI18n name="fonctionnalites"
+ code="eliot.libelle.fonctionnalites"/>
+ <eliotjs:varI18n name="acces" code="eliot.libelle.acces"/>
+ </eliotjs:ns>
+
+
+ <eliotjs:ns name="messages">
+ <eliotjs:varI18n name="modificationNonEnregistree"
+ code="eliot.scolarite.message.modificationNonEnregistree"/>
+ <eliotjs:varI18n name="loadMaskChargement"
+ code="scolarite.loading.text"/>
+ <eliotjs:varI18n name="loadMaskEnregistrement"
+ code="scolarite.enregistrement.maskText"/>
+ <eliotjs:varI18n name="erreurInconnue"
+ code="eliot.scolarite.messages.erreurInconnue"/>
+ <eliotjs:varI18n name="attention"
+ code="eliot.scolarite.message.attention"/>
+ <eliotjs:varI18n name="avertissement"
+ code="eliot.scolarite.message.avertissement"/>
+ </eliotjs:ns>
+
+
+ <eliotjs:ns name="data">
+ <eliotjs:varJson name="fonctions" value="${fonctionsData}"/>
+ <eliotjs:varJson name="utilisateurs" value="${utilisateursData}"/>
+ </eliotjs:ns>
+
+ </eliotjs:ns>
+</g:javascript>
--- /dev/null
+<%--
+Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+
+Lilie is free software. You can redistribute it and/or modify since
+you respect the terms of either (at least one of the both license) :
+- under the terms of the GNU Affero General Public License as
+published by the Free Software Foundation, either version 3 of the
+License, or (at your option) any later version.
+- the CeCILL-C as published by CeCILL-C; either version 1 of the
+License, or any later version
+
+There are special exceptions to the terms and conditions of the
+licenses as they are applied to this software. View the full text of
+the exception in file LICENSE.txt in the directory of this software
+distribution.
+
+Lilie is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+Licenses for more details.
+
+You should have received a copy of the GNU General Public License
+and the CeCILL-C along with Lilie. If not, see :
+ <http://www.gnu.org/licenses/> and
+ <http://www.cecill.info/licences.fr.html>.
+
+--%>
+
+<%@ page contentType="text/html;charset=UTF-8" %>
+<html>
+<head>
+ <meta name="layout" content="eliot.simple.extjs.3.2.0">
+
+ <title>Accès aux fonctions</title>
+
+
+ <link rel="stylesheet"
+ type="text/css"
+ href="${resource(
+ dir: 'js/lib/extensionsextjs/lovcombo',
+ file: 'Ext.ux.form.LovCombo.css'
+ )}"/>
+
+ <g:javascript library="/src/views/parametrages/accesfonction/ConfigServeur"/>
+ <g:javascript library="/src/views/parametrages/accesfonction/Constantes"/>
+
+ <g:render template="/parametrages/accesfonction/modele"/>
+
+ <g:javascript library="src/views/commun/Message"/>
+ <g:javascript library="lib/extensionsextjs/lovcombo/Ext.ux.form.LovCombo"/>
+ <g:javascript library="src/views/commun/AjaxHelper"/>
+ <g:javascript library="src/views/commun/Ext.ux.CheckColumn"/>
+ <g:javascript library="/src/views/parametrages/accesfonction/ToolBarView"/>
+ <g:javascript
+ library="/src/views/parametrages/accesfonction/AccesFonctionController"/>
+ <g:javascript
+ library="/src/views/parametrages/accesfonction/ParametrageOngletView"/>
+ <g:javascript library="/src/views/parametrages/accesfonction/Application"/>
+</head>
+
+<body>
+<div id="messages" class="portal-messages"/>
+</body>
+</html>
\ No newline at end of file
width: auto;
}
-ul.x-tab-strip li {
- float: right;
- margin-right: 2px;
-}
-
td, th {
padding: 0px;
}
.ext-ie.layout-html #divBreadCrumbs button {
padding-top: 3px;
}
+
+.x-grid3-check-col.disabled {
+ background-image:url(../images/menu/unchecked-disabled.gif);
+}
+
+.x-grid3-check-col-on.disabled {
+ background-image:url(../images/menu/checked-disabled.gif);
+}
\ No newline at end of file
--- /dev/null
+/** vim: ts=4:sw=4:nu:fdc=4:nospell
+ *
+ * Ext.ux.form.LovCombo CSS File
+ *
+ * @author Ing.Jozef Sakáloš
+ * @copyright (c) 2008, by Ing. Jozef Sakáloš
+ * @date 5. April 2008
+ * @version $Id: Ext.ux.form.LovCombo.css 189 2008-04-16 21:01:06Z jozo $
+ *
+ * @license Ext.ux.form.LovCombo.css is licensed under the terms of the Open Source
+ * LGPL 3.0 license. Commercial use is permitted to the extent that the
+ * code/component(s) do NOT become part of another Open Source or Commercially
+ * licensed development library or toolkit without explicit permission.
+ *
+ * License details: http://www.gnu.org/licenses/lgpl.html
+ */
+
+.ux-lovcombo-icon {
+ width:16px;
+ height:16px;
+ float:left;
+ background-position: -1px -1px ! important;
+ background-repeat:no-repeat ! important;
+}
+.ux-lovcombo-icon-checked {
+ background: transparent url(../../extjs-3.2.0/resources/images/default/menu/checked.gif);
+}
+.ux-lovcombo-icon-unchecked {
+ background: transparent url(../../extjs-3.2.0/resources/images/default/menu/unchecked.gif);
+}
+
+/* eof */
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+// vim: ts=4:sw=4:nu:fdc=4:nospell
+/*global Ext */
+
+// add RegExp.escape if it has not been already added
+if ('function' !== typeof RegExp.escape) {
+ RegExp.escape = function(s) {
+ if ('string' !== typeof s) {
+ return s;
+ }
+ // Note: if pasting from forum, precede ]/\ with backslash manually
+ return s.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
+ }; // eo function escape
+}
+
+// create namespace
+Ext.ns('Ext.ux.form');
+
+/**
+ *
+ * @class Ext.ux.form.LovCombo
+ * @extends Ext.form.ComboBox
+ */
+Ext.ux.form.LovCombo = Ext.extend(Ext.form.ComboBox, {
+
+ // {{{
+ // configuration options
+ /**
+ * @cfg {String} checkField name of field used to store checked state.
+ * It is automatically added to existing fields.
+ * Change it only if it collides with your normal field.
+ */
+ checkField:'checked',
+
+ assertValue: Ext.emptyFn
+
+ /**
+ * @cfg {String} separator separator to use between values and texts
+ */
+ , separator:','
+
+ /**
+ * @cfg {String/Array} tpl Template for items.
+ * Change it only if you know what you are doing.
+ */
+ // }}}
+ // {{{
+ ,initComponent : function() {
+
+ // template with checkbox
+ if (!this.tpl) {
+ this.tpl =
+ '<tpl for=".">'
+ + '<div class="x-combo-list-item">'
+ + '<img src="' + Ext.BLANK_IMAGE_URL + '" '
+ + 'class="ux-lovcombo-icon ux-lovcombo-icon-'
+ + '{[values.' + this.checkField + '?"checked":"unchecked"' + ']}">'
+ + '<div class="ux-lovcombo-item-text">{' + (this.displayField || 'text' ) + '}</div>'
+ + '</div>'
+ + '</tpl>'
+ ;
+ }
+
+ // call parent
+ Ext.ux.form.LovCombo.superclass.initComponent.apply(this, arguments);
+
+ // install internal event handlers
+ this.on({
+ scope:this
+ ,beforequery:this.onBeforeQuery
+ ,blur:this.onRealBlur
+ });
+
+ // remove selection from input field
+ this.onLoad = this.onLoad.createSequence(function() {
+ if (this.el) {
+ var v = this.el.dom.value;
+ this.el.dom.value = '';
+ this.el.dom.value = v;
+ }
+ });
+
+ } // e/o function initComponent
+ // }}}
+ // {{{
+ /**
+ * Disables default tab key bahavior
+ * @private
+ */
+ ,
+ initEvents:function() {
+ Ext.ux.form.LovCombo.superclass.initEvents.apply(this, arguments);
+
+ // disable default tab handling - does no good
+ this.keyNav.tab = false;
+
+ } // eo function initEvents
+ // }}}
+ // {{{
+ /**
+ * clears value
+ */
+ ,
+ clearValue:function() {
+ this.value = '';
+ this.setRawValue(this.value);
+ this.store.clearFilter();
+ this.store.each(function(r) {
+ r.set(this.checkField, false);
+ }, this);
+ if (this.hiddenField) {
+ this.hiddenField.value = '';
+ }
+ this.applyEmptyText();
+ } // eo function clearValue
+ // }}}
+ // {{{
+ /**
+ * @return {String} separator (plus space) separated list of selected displayFields
+ * @private
+ */
+ ,
+ getCheckedDisplay:function() {
+ var re = new RegExp(this.separator, "g");
+ return this.getCheckedValue(this.displayField).replace(re, this.separator + ' ');
+ } // eo function getCheckedDisplay
+ // }}}
+ // {{{
+ /**
+ * @return {String} separator separated list of selected valueFields
+ * @private
+ */
+ ,
+ getCheckedValue:function(field) {
+ field = field || this.valueField;
+ var c = [];
+
+ // store may be filtered so get all records
+ var snapshot = this.store.snapshot || this.store.data;
+
+ snapshot.each(function(r) {
+ if (r.get(this.checkField)) {
+ c.push(r.get(field));
+ }
+ }, this);
+
+ return c.join(this.separator);
+ } // eo function getCheckedValue
+ // }}}
+ // {{{
+ /**
+ * beforequery event handler - handles multiple selections
+ * @param {Object} qe query event
+ * @private
+ */
+ ,
+ onBeforeQuery:function(qe) {
+ var text = RegExp.escape(this.getCheckedDisplay());
+ qe.query = qe.query.replace(new RegExp(text + '[ ' + this.separator + ']*'), '');
+ } // eo function onBeforeQuery
+ // }}}
+ // {{{
+ /**
+ * blur event handler - runs only when real blur event is fired
+ */
+ ,
+ onRealBlur:function() {
+ this.list.hide();
+ var rv = this.getRawValue();
+ var rva = rv.split(new RegExp(RegExp.escape(this.separator) + ' *'));
+ var va = [];
+ var snapshot = this.store.snapshot || this.store.data;
+
+ // iterate through raw values and records and check/uncheck items
+ Ext.each(rva, function(v) {
+ snapshot.each(function(r) {
+ if (v === r.get(this.displayField)) {
+ va.push(r.get(this.valueField));
+ }
+ }, this);
+ }, this);
+ this.setValue(va.join(this.separator));
+ this.store.clearFilter();
+ } // eo function onRealBlur
+ // }}}
+ // {{{
+ /**
+ * Combo's onSelect override
+ * @private
+ * @param {Ext.data.Record} record record that has been selected in the list
+ * @param {Number} index index of selected (clicked) record
+ */
+ ,
+ onSelect:function(record, index) {
+ if (this.fireEvent('beforeselect', this, record, index) !== false) {
+
+ // toggle checked field
+ record.set(this.checkField, !record.get(this.checkField));
+
+ // display full list
+ if (this.store.isFiltered()) {
+ this.doQuery(this.allQuery);
+ }
+ // set (update) value and fire event
+ this.setValue(this.getCheckedValue());
+ this.fireEvent('select', this, record, index);
+ }
+ } // eo function onSelect
+ // }}}
+ // {{{
+ /**
+ * Sets the value of the LovCombo
+ * @param {Mixed} v value
+ */
+ ,
+ setValue:function(v) {
+ if (v) {
+ v = '' + v;
+ if (this.valueField) {
+ this.store.clearFilter();
+ this.store.each(function(r) {
+ var checked = !(!v.match(
+ '(^|' + this.separator + ')' + RegExp.escape(r.get(this.valueField))
+ + '(' + this.separator + '|$)'))
+ ;
+
+ r.set(this.checkField, checked);
+ }, this);
+ this.value = this.getCheckedValue();
+ this.setRawValue(this.getCheckedDisplay());
+ if (this.hiddenField) {
+ this.hiddenField.value = this.value;
+ }
+ }
+ else {
+ this.value = v;
+ this.setRawValue(v);
+ if (this.hiddenField) {
+ this.hiddenField.value = v;
+ }
+ }
+ if (this.el) {
+ this.el.removeClass(this.emptyClass);
+ }
+ }
+ else {
+ this.clearValue();
+ }
+ } // eo function setValue
+ // }}}
+ // {{{
+ /**
+ * Selects all items
+ */
+ ,
+ selectAll:function() {
+ this.store.each(function(record) {
+ // toggle checked field
+ record.set(this.checkField, true);
+ }, this);
+
+ //display full list
+ this.doQuery(this.allQuery);
+ this.setValue(this.getCheckedValue());
+ } // eo full selectAll
+ // }}}
+ // {{{
+ /**
+ * Deselects all items. Synonym for clearValue
+ */
+ ,
+ deselectAll:function() {
+ this.clearValue();
+ } // eo full deselectAll
+ // }}}
+
+}); // eo extend
+
+// register xtype
+Ext.reg('lovcombo', Ext.ux.form.LovCombo);
+
+// eof
\ No newline at end of file
/**
* Fournit les fonctionnalités pour afficher des messages d'erreur ou de
- * confirmation dans le frontoffice d'eliot-notes
+ * confirmation dans le frontoffice d'eliot-scolarité
* + définit les messages à afficher
* @author jtra
* @author ywan
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+/**
+ * Classe Application de la page de paramétrage des accès aux fonctions
+ * @author bahj
+ */
+
+Ext.ns('eliot.scolarite.parametrage.accesfonction');
+
+eliot.scolarite.parametrage.accesfonction.AccesFonctionController = Ext.extend(Ext.util.Observable, {
+
+ constructor:function () {
+ this.NS = eliot.scolarite.parametrage.accesfonction;
+ this.Constantes = this.NS.Constantes;
+ this.ConfigServeur = this.NS.ConfigServeur;
+
+ this.addEvents(
+ this.Constantes.eventId.updateFonctionsGrid,
+ this.Constantes.eventId.updateUtilisateurGrid,
+ this.Constantes.eventId.utilisateurActiveAllBouton,
+ this.Constantes.eventId.fonctionsActiveAllBouton
+ );
+
+ this.fonctionsParamStore = undefined;
+
+ this.utilisateursParamStore = undefined;
+
+ },
+
+ createUtilisateursStore:function (mapping) {
+ this.utilisateursParamStore = new Ext.data.GroupingStore(
+ this.getParametrageGridStore(mapping)
+ );
+
+ this.observeModificationStore(
+ this.utilisateursParamStore,
+ this.getUtilisateurEventToolbar()
+ );
+
+ return this.utilisateursParamStore;
+ },
+
+ createFonctionsStore:function (mapping) {
+ this.fonctionsParamStore = new Ext.data.GroupingStore(
+ this.getParametrageGridStore(mapping)
+ );
+
+ this.observeModificationStore(
+ this.fonctionsParamStore,
+ this.getFonctionsEventToolbar()
+ );
+
+ return this.fonctionsParamStore;
+ },
+
+ getParametrageGridStore:function (mapping) {
+ var fields = [
+ {name:this.Constantes.dataIndex.id},
+ {name:this.Constantes.dataIndex.libelle},
+ {name:this.Constantes.dataIndex.niveau},
+ {name:this.Constantes.dataIndex.groupe},
+ {name:this.Constantes.dataIndex.parametrable},
+ {name:this.Constantes.dataIndex.parentId},
+ {name:this.Constantes.dataIndex.modifiable}
+ ];
+
+ for (var i = 0; i < mapping.length; i++) {
+ fields.push({name:mapping[i].dataIndex});
+ }
+
+ return {
+ autoDestroy:true,
+ reader:new Ext.data.JsonReader({
+ root:'data',
+ idProperty:this.Constantes.dataIndex.id,
+ fields:fields
+ }),
+
+ groupField:this.Constantes.dataIndex.groupe
+ };
+ },
+
+ getComboStore:function (data) {
+
+ return new Ext.data.JsonStore({
+ fields:[
+ {name:'id'},
+ {name:'libelle', type:'string'}
+ ],
+ data:data
+ });
+ },
+
+ isFonctionsDirty:function () {
+ return this.isStoreDirty(this.fonctionsParamStore);
+ },
+
+ isUtilisateursDirty:function () {
+ return this.isStoreDirty(this.utilisateursParamStore);
+ },
+
+ isStoreDirty:function (store) {
+ if (store == undefined) {
+ return false;
+ }
+ else {
+ return (store.getModifiedRecords().length > 0);
+ }
+ },
+
+ observeModificationStore:function (store, config) {
+ store.addListener({
+ update:{
+ fn:function (store) {
+ var event = config.desactiveToolbarButton;
+ var modifs = store.getModifiedRecords();
+
+ if (modifs.length > 0) {
+ event = config.activeToolbarButton;
+ }
+
+ this.fireEvent(event)
+ }
+ },
+ scope:this
+ });
+ },
+
+ observeToolBarView:function (toolbar, config) {
+ toolbar.addListener(
+ this.Constantes.eventId.actionValeurChange,
+ function (selectionIds) {
+ this.actionSelectionChange(
+ config,
+ selectionIds
+ );
+ },
+ this
+ );
+ toolbar.addListener(
+ this.Constantes.eventId.actionAnnuler,
+ function () {
+ if (config.store) {
+ config.store.rejectChanges();
+ }
+ },
+ this
+ );
+
+ toolbar.addListener(
+ this.Constantes.eventId.actionEnregistrer,
+ function (selectionIds) {
+ this.executeEnregistrer(
+ selectionIds,
+ config.store,
+ config.enregistreParametresUrl
+ );
+ },
+ this
+ );
+ },
+
+ executeEnregistrer:function (selectionIds, store, url) {
+ var data = [];
+
+ var modifiedRecords = store.getModifiedRecords();
+
+ for (var i = 0; i < modifiedRecords.length; i++) {
+
+ var currentRecord = modifiedRecords[i];
+
+ var modificationRecord = {
+ fonctionaliteId:currentRecord.id,
+ parametres:currentRecord.getChanges()
+ };
+ data.push(modificationRecord)
+ }
+
+ eliot.commun.AjaxHelper.request({
+ url:url,
+ params:{
+ data:Ext.encode(data),
+ selectionIds : selectionIds
+ },
+
+ success:function (reponse) {
+ eliot.scolarite.Message.showConfirmation(
+ reponse.message
+ );
+ store.commitChanges();
+ },
+
+ failure:function (reponse) {
+ if ((reponse.message !== undefined) && (reponse.message !== '')) {
+ eliot.scolarite.Message.showErreur(reponse.message);
+ }
+ else {
+ eliot.scolarite.Message.showErreur(this.ConfigServeur.messages.erreurInconnue);
+ }
+ },
+ maskText:this.ConfigServeur.messages.loadMaskEnregistrement,
+ scope:this
+ });
+ },
+
+ actionSelectionChange:function (config, selectionIds) {
+ if (!selectionIds) {
+ this.fireEvent(
+ config.updtaeGridEvent,
+ null,
+ []
+ );
+ return;
+ }
+
+ eliot.commun.AjaxHelper.request({
+ url:config.getParametrageUrl,
+ params:{
+ selectionIds:selectionIds
+ },
+
+ success:function (reponse) {
+ var parametragesInfo = reponse.parametrages;
+
+ config.store =
+ config.createStoreFonction.createDelegate(this)(parametragesInfo.mapping);
+
+ config.store.loadData(parametragesInfo);
+
+ this.fireEvent(
+ config.updtaeGridEvent,
+ config.store,
+ parametragesInfo.mapping
+ );
+ },
+
+ failure:function (reponse) {
+ if ((reponse.message !== undefined) && (reponse.message !== '')) {
+ eliot.scolarite.Message.showErreur(reponse.message);
+ }
+ else {
+ eliot.scolarite.Message.showErreur(this.ConfigServeur.messages.erreurInconnue);
+ }
+ },
+ maskText:this.ConfigServeur.messages.loadMaskChargement,
+ scope:this
+ });
+ },
+
+ getConfigFonctionsParametrage:function () {
+ return {
+ createStoreFonction:this.createFonctionsStore,
+ enregistreParametresUrl:this.ConfigServeur.url.enregistreFonctionsParam,
+ getParametrageUrl:this.ConfigServeur.url.getFonctionsParametrage,
+ updtaeGridEvent:this.Constantes.eventId.updateFonctionsGrid
+ };
+ },
+
+ getConfigUtilisateurParametrage:function () {
+ return {
+ createStoreFonction:this.createUtilisateursStore,
+ enregistreParametresUrl:this.ConfigServeur.url.enregistreUtilisateurParam,
+ getParametrageUrl:this.ConfigServeur.url.getUtilisateurParametrage,
+ updtaeGridEvent:this.Constantes.eventId.updateUtilisateurGrid
+ };
+ },
+
+ getUtilisateurEventToolbar:function () {
+ return {
+ activeToolbarButton:this.Constantes.eventId.utilisateurActiveAllBouton,
+ desactiveToolbarButton:this.Constantes.eventId.utilisateurDesactiveAllBouton
+ }
+ },
+
+ getFonctionsEventToolbar:function () {
+ return {
+ activeToolbarButton:this.Constantes.eventId.fonctionsActiveAllBouton,
+ desactiveToolbarButton:this.Constantes.eventId.fonctionsDesactiveAllBouton
+ }
+ }
+
+})
+;
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+/**
+ * Classe Application de la page de paramétrage des accès aux fonctions
+ * @author bahj
+ */
+
+Ext.ns('eliot.scolarite.parametrage.accesfonction');
+
+eliot.scolarite.parametrage.accesfonction.Application = function () {
+
+ var Clazz = Ext.extend(Ext.util.Observable, {
+ constructor:function () {
+ this.NS = eliot.scolarite.parametrage.accesfonction;
+ this.Constantes = this.NS.Constantes;
+ this.ConfigServeur = this.NS.ConfigServeur;
+
+
+ // todo suppression du load mask
+
+ var accesFonctionController = new this.NS.AccesFonctionController();
+
+ // Onglet de paramétrage par fonction
+ var fonctionToolBarView = new this.NS.ToolBarView({
+ getSelectionCombo:this.NS.createFonctionLovComboView,
+ store:accesFonctionController.getComboStore(
+ this.ConfigServeur.data.fonctions
+ )
+ });
+ fonctionToolBarView.setValide(
+ accesFonctionController.isFonctionsDirty.createDelegate(
+ accesFonctionController, []
+ )
+ );
+
+ fonctionToolBarView.observeAccesFonctionController(
+ accesFonctionController,
+ accesFonctionController.getFonctionsEventToolbar()
+ );
+
+ accesFonctionController.observeToolBarView(
+ fonctionToolBarView,
+ accesFonctionController.getConfigFonctionsParametrage()
+ );
+
+ var fonctionParametrageOngletView = new this.NS.ParametrageOngletView({
+ toolBarView:fonctionToolBarView.panel
+ });
+ fonctionParametrageOngletView.observeDemandeCreationGrid(
+ accesFonctionController,
+ this.Constantes.eventId.updateFonctionsGrid
+ );
+
+
+ // Onglet de paramétrage par utilisateur
+ var utilisateurToolBarView = new this.NS.ToolBarView({
+ getSelectionCombo:this.NS.createUtilisateurComboView,
+ store:accesFonctionController.getComboStore(
+ this.ConfigServeur.data.utilisateurs
+ )
+ });
+ utilisateurToolBarView.setValide(
+ accesFonctionController.isUtilisateursDirty.createDelegate(
+ accesFonctionController, []
+ )
+ );
+ utilisateurToolBarView.observeAccesFonctionController(
+ accesFonctionController,
+ accesFonctionController.getUtilisateurEventToolbar()
+ );
+
+ accesFonctionController.observeToolBarView(
+ utilisateurToolBarView,
+ accesFonctionController.getConfigUtilisateurParametrage()
+ );
+
+ var utilisateurParametrageOngletView = new this.NS.ParametrageOngletView({
+ toolBarView:utilisateurToolBarView.panel
+ });
+ utilisateurParametrageOngletView.observeDemandeCreationGrid(
+ accesFonctionController,
+ this.Constantes.eventId.updateUtilisateurGrid
+ );
+
+ // Mise en forme de la page
+ var centerRegionItems = new Ext.TabPanel({
+ activeTab:0,
+ border:false,
+ defaults:{
+ layout:'fit'
+ },
+ items:[
+ {
+ title:this.ConfigServeur.libelle.fonctions,
+ items:fonctionParametrageOngletView.panel
+ },
+ {
+ title:this.ConfigServeur.libelle.utilisateur,
+ items:utilisateurParametrageOngletView.panel
+ }
+ ]
+
+ });
+
+ // Rendu du viewport
+ Ext.onReady(function () {
+ eliot.layout.doLayout(
+ 'viewPort',
+ 'northPanel',
+ 'centerPanel',
+ centerRegionItems
+ );
+ });
+ }
+
+ });
+// Construit l'instance singleton
+ return new Clazz({
+ name:'eliot-scolarite-acces-fonction'
+ });
+}
+ ();
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+/**
+ * @author bahj
+ */
+
+Ext.ns('eliot.scolarite.parametrage.accesfonction');
+
+eliot.scolarite.parametrage.accesfonction.ConfigServeur = {
+
+ libelle:{
+ fonctions:undefined,
+ utilisateur:undefined,
+ enregistrer:undefined,
+ annuler:undefined,
+ fonctionnalites:undefined,
+ acces:undefined
+ },
+
+ url:{
+ getUtilisateurParametrage:undefined,
+ getFonctionsParametrage:undefined,
+ enregistreFonctionsParam:undefined,
+ enregistreUtilisateurParam:undefined
+ },
+
+ data:{
+ fonctions:undefined,
+ utilisateurs:undefined
+ },
+
+ messages:{
+ modificationNonEnregistree:undefined,
+ loadMaskChargement:undefined,
+ loadMaskEnregistrement:undefined,
+ erreurInconnue:undefined,
+ enregistrementEffectue:undefined,
+ attention:undefined,
+ avertissement:undefined
+ }
+
+};
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+/**
+ * @author bahj
+ */
+
+Ext.ns('eliot.scolarite.parametrage.accesfonction');
+
+eliot.scolarite.parametrage.accesfonction.Constantes = {
+
+ eventId:{
+ actionEnregistrer:'actionEnregistrer',
+ actionAnnuler:'actionAnnuler',
+ actionValeurChange:'actionValeurChange',
+ updateFonctionsGrid:'updateFonctionsGrid',
+ updateUtilisateurGrid:'updateUtilisateurGrid',
+ utilisateurActiveAllBouton:'utilisateurActiveAllBouton',
+ fonctionsActiveAllBouton:'fonctionsActiveAllBouton',
+ fonctionsDesactiveAllBouton:'fonctionsDesactiveAllBouton',
+ utilisateurDesactiveAllBouton:'utilisateurDesactiveAllBouton'
+ },
+
+ dataIndex:{
+ id:'id',
+ libelle:'libelle',
+ niveau:'niveau',
+ groupe:'groupe',
+ parametrable:'parametrable',
+ parentId:'parentId',
+ modifiable:'modifiable'
+ }
+
+};
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+/**
+ *
+ * @author bahj
+ */
+
+Ext.ns('eliot.scolarite.parametrage.accesfonction');
+
+eliot.scolarite.parametrage.accesfonction.ParametrageOngletView = Ext.extend(Ext.util.Observable, {
+
+ constructor:function (config) {
+ this.NS = eliot.scolarite.parametrage.accesfonction;
+ this.Constantes = this.NS.Constantes;
+ this.ConfigServeur = this.NS.ConfigServeur;
+
+ this.Config = config;
+
+ this.panel = new Ext.Panel(this.getConfigPanel());
+ },
+
+ getConfigPanel:function () {
+
+ this.gridPanel = new Ext.Panel({
+ region:'center',
+ layout:'fit'
+ });
+
+ return {
+ layout:'border',
+ border:false,
+ defaults:{
+ border:false
+ },
+ items:[
+ {
+ region:'north',
+ height:40,
+ items:this.Config.toolBarView
+ },
+ this.gridPanel
+ ]
+ }
+ },
+
+ createParametrageGrid:function (store, mapping) {
+
+ this.gridPlugins = [];
+ this.gridPanel.removeAll(true);
+
+ if (mapping.length > 0) {
+ var columns = [
+ {
+ header:this.createHeader(this.ConfigServeur.libelle.fonctionnalites),
+ width:200,
+ dataIndex:this.Constantes.dataIndex.libelle,
+ renderer:{
+ fn:function (value, metaData, record) {
+ var result = '';
+ var niveau = record.get(this.Constantes.dataIndex.niveau);
+
+ if (niveau != null) {
+ for (var i = 0; i < niveau; i++) {
+ result += ' ';
+ }
+ }
+
+ result += value;
+
+ return result;
+ },
+ scope:this
+ }
+ },
+ {
+ dataIndex:this.Constantes.dataIndex.groupe
+ }
+ ];
+
+ for (var i = 0; i < mapping.length; i++) {
+ columns.push(this.createCheckColumn({
+ header:this.createHeader(mapping[i].header),
+ dataIndex:mapping[i].dataIndex,
+ visibleIndex:this.Constantes.dataIndex.parametrable,
+ enableIndex:this.Constantes.dataIndex.modifiable,
+ parentIndex:this.Constantes.dataIndex.parentId,
+ width:100,
+ align:'center'
+ }));
+ }
+
+ var view = new Ext.grid.GroupingView({
+ groupTextTpl:'{group}',
+ hideGroupedColumn:true
+ });
+
+ var grid = new Ext.grid.GridPanel({
+ store:store,
+ plugins:this.gridPlugins,
+ view:view,
+ colModel:new Ext.grid.ColumnModel({
+ defaults:{
+ sortable:false,
+ menuDisabled:true,
+ width:75
+ },
+ columns:columns
+ })
+ });
+
+ this.gridPanel.add(grid);
+ }
+
+ this.gridPanel.doLayout();
+ },
+
+ createHeader:function (libelle) {
+ return '<span style="font-weight: normal;white-space: normal; ">' +
+ libelle +
+ '</span>';
+ },
+
+ createCheckColumn:function (config) {
+ config.renderer = function (v, p, record) {
+ if (record.get(this.visibleIndex) != true) {
+ return '';
+ }
+
+ var disabled = !record.get(this.enableIndex);
+
+ p.css += ' x-grid3-check-col-td';
+ return String.format(
+ '<div style="disabled:true" class="x-grid3-check-col{0} {1} {2}"> </div>',
+ v ? '-on' : '',
+ disabled ? 'disabled' : '',
+ this.createId());
+ };
+
+ config.onMouseDown = function (e, t) {
+ if (Ext.fly(t).hasClass(this.createId())) {
+ e.stopEvent();
+ var store = this.grid.store;
+ var index = this.grid.getView().findRowIndex(t);
+ var record = store.getAt(index);
+ var value = !record.data[this.dataIndex];
+
+ if (record.get(this.enableIndex) == true) {
+ record.set(this.dataIndex, value);
+
+ if (value == true) {
+ var parentId = record.get(this.parentIndex);
+
+ while (parentId != null) {
+ var parent = store.getById(parentId);
+ parentId = null;
+
+ if (parent != null) {
+ parentId = parent.get(this.parentIndex);
+
+ if ((parent.get(this.visibleIndex) == true) &&
+ (parent.get(this.enableIndex) == true)) {
+ parent.set(this.dataIndex, value);
+ }
+ }
+ }
+
+ }
+
+ else {
+ var parentIndex = this.parentIndex;
+
+ var getChildren = function (parentId) {
+ var descendants = [];
+ var children = [];
+
+ store.each(function (child) {
+ if (child.get(parentIndex) == parentId) {
+ children.push(child);
+ }
+ });
+
+ descendants = descendants.concat(children);
+
+ for (var i = 0; i < children.length; i++) {
+ var child = children[i];
+ descendants = descendants.concat(getChildren(child.id));
+ }
+
+ return descendants;
+ };
+
+ var descendants = getChildren(record.id);
+
+ for (var i = 0; i < descendants.length; i++) {
+ var descendant = descendants[i];
+
+ if ((descendant.get(this.visibleIndex) == true) &&
+ (descendant.get(this.enableIndex) == true)) {
+ descendant.set(this.dataIndex, value);
+ }
+ }
+ }
+
+ }
+ }
+ };
+
+ var checkbox = new Ext.grid.CheckColumn(config);
+ this.gridPlugins.push(checkbox);
+
+ return checkbox;
+ },
+
+ observeDemandeCreationGrid:function (accesFonctionController, event) {
+ accesFonctionController.addListener(
+ event,
+ this.createParametrageGrid,
+ this
+ );
+ }
+
+});
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ * This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ *
+ * Lilie is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE.txt in the directory of this software
+ * distribution.
+ *
+ * Lilie is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the CeCILL-C along with Lilie. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ */
+
+/**
+ *
+ * @author bahj
+ */
+
+Ext.ns('eliot.scolarite.parametrage.accesfonction');
+
+eliot.scolarite.parametrage.accesfonction.createFonctionLovComboView = function (config) {
+ return new Ext.ux.form.LovCombo({
+ store:this.Config.store,
+ fieldLabel:this.ConfigServeur.libelle.fonctions,
+ hideOnSelect:false,
+ displayField:'libelle',
+ valueField:'id',
+ mode:'local',
+ width:350,
+ editable:false,
+ listeners:{
+ beforeselect:{
+ fn:function (combo, record, index) {
+ var isDirty = this.isDirty && (this.isDirty());
+ if (isDirty) {
+ var selection = combo.getValue() + ',' + record.id;
+ this.actionSelectionEnEtatDirty(combo, selection);
+ return false;
+ }
+ }
+ },
+ select:{
+ fn:function (combo, record) {
+ this.selectionIds = combo.getValue();
+
+ this.fireEvent(
+ this.Constantes.eventId.actionValeurChange,
+ combo.getValue()
+ );
+ }
+ },
+ scope:this
+ }
+ });
+};
+
+eliot.scolarite.parametrage.accesfonction.createUtilisateurComboView = function (config) {
+ return new Ext.form.ComboBox({
+ width:200,
+ store:this.Config.store,
+ fieldLabel:this.ConfigServeur.libelle.utilisateur,
+ triggerAction:'all',
+ selectOnFocus:true,
+ forceSelection:true,
+ mode:'local',
+ valueField:'id',
+ displayField:'libelle',
+ editable:true,
+ listeners:{
+ beforeselect:{
+ fn:function (combo, record, index) {
+ var isDirty = this.isDirty && (this.isDirty());
+ if (isDirty) {
+ this.actionSelectionEnEtatDirty(combo, record.id);
+ return false;
+ }
+ }
+ },
+ select:{
+ fn:function (combo, record) {
+ this.selectionIds = record.id;
+
+ this.fireEvent(
+ this.Constantes.eventId.actionValeurChange,
+ record.id
+ );
+ }
+ },
+ scope:this
+ }
+ });
+};
+
+
+eliot.scolarite.parametrage.accesfonction.ToolBarView = Ext.extend(Ext.util.Observable, {
+
+ constructor:function (config) {
+ this.NS = eliot.scolarite.parametrage.accesfonction;
+ this.Constantes = this.NS.Constantes;
+ this.ConfigServeur = this.NS.ConfigServeur;
+
+ this.addEvents(
+ this.Constantes.eventId.actionEnregistrer,
+ this.Constantes.eventId.actionAnnuler,
+ this.Constantes.eventId.actionValeurChange
+ );
+
+ this.Config = config;
+
+ this.isDirty = false;
+
+ this.enregistrerBouton = this.createEnregistrerBouton();
+
+ this.annulerBouton = this.createAnnulerBouton();
+
+ this.panel = new Ext.Panel(this.getConfigPanel());
+
+ this.selectionIds = undefined;
+ },
+
+ getConfigPanel:function () {
+
+ var getSelectionCombo = this.Config.getSelectionCombo;
+
+ return {
+ frame:true,
+ layout:'column',
+ border:false,
+ height:42,
+ defaults:{
+ layout:'form',
+ labelAlign:'right',
+ labelWidth:70,
+ labelSeparator:' : '
+
+ },
+ items:[
+ {
+ width:700,
+ items:getSelectionCombo.createDelegate(this).apply(this)
+ },
+ {
+ width:130,
+ items:this.enregistrerBouton
+ },
+ {
+ width:70,
+ items:this.annulerBouton
+ }
+ ]
+ };
+ },
+
+ createEnregistrerBouton:function () {
+ return new Ext.Button({
+ disabled:true,
+ width:80,
+ text:this.ConfigServeur.libelle.enregistrer,
+ handler:this.actionEnregistrer,
+ scope : this
+ });
+ },
+
+ createAnnulerBouton:function () {
+ return new Ext.Button({
+ disabled:true,
+ width:60,
+ text:this.ConfigServeur.libelle.annuler,
+ handler:this.actionAnnuler,
+ scope:this
+ });
+ },
+
+ actionEnregistrer:function () {
+ eliot.scolarite.Message.resetMessages();
+
+ this.fireEvent(
+ this.Constantes.eventId.actionEnregistrer,
+ this.selectionIds
+ );
+ },
+
+ actionAnnuler:function () {
+ eliot.scolarite.Message.resetMessages();
+
+ this.fireEvent(
+ this.Constantes.eventId.actionAnnuler
+ );
+ },
+
+ setValide:function (isDirty) {
+ this.isDirty = isDirty;
+ },
+
+ actionSelectionEnEtatDirty:function (combo, ids) {
+ Ext.MessageBox.confirm(
+ this.ConfigServeur.messages.attention,
+ this.ConfigServeur.messages.avertissement,
+ function (btn) {
+ if (btn === 'yes') {
+ this.actionContinuer(combo, ids);
+ }
+ },
+ this
+ );
+ },
+
+ actionContinuer:function (combo, ids) {
+ this.actionAnnuler();
+
+ combo.setValue(ids);
+
+ this.fireEvent(
+ this.Constantes.eventId.actionValeurChange,
+ ids
+ );
+ },
+
+
+ observeAccesFonctionController:function (controller, configEvent) {
+ controller.addListener(
+ configEvent.activeToolbarButton,
+ this.activeAllBouton,
+ this
+ );
+
+ controller.addListener(
+ configEvent.desactiveToolbarButton,
+ this.desactiveAllBouton,
+ this
+ );
+ },
+
+ activeAllBouton:function () {
+ this.annulerBouton.enable();
+ this.enregistrerBouton.enable();
+ },
+
+ desactiveAllBouton:function () {
+ this.annulerBouton.disable();
+ this.enregistrerBouton.disable();
+ }
+
+
+});