Arborescence des pages

Vous regardez une version antérieure (v. /wiki/display/SGC/Changelog+ESUP-SGC) de cette page.

afficher les différences afficher l'historique de la page

« Afficher la version précédente Vous regardez la version actuelle de cette page. (v. 5) afficher la version suivante »

Version 1.0.0 - xx/yy/2018 - en cours de dév

29/06/2018

  • fixe lastCardTemplate : devient une référence
  • possibilité de mettre requestFree à false sans passer par groupe mais via un userinfo - exemple avec le requestNotFreeUserInfoService dans Configuration spécifique COMUE Normandie Université#src/main/resources/META-INF/spring/applicationContext-services.xml
  • card-info restreint pour carte extérieure (== carte 'importée')
  • fixe userType : de 1 à 3 caractères ok -> dans les ocnfigurations via l'ihm, au lieu de IEP on peut mettre I;E;P et aussi ainsi I;Ext;P par exemple (sépérateur ;)
  • possibilité de rechercher dans plusieurs ldap pour le super-manager
  • des debugs de l'interface web

    Suite à la mise à jour du code sur cette version (via un git pull sur le master), il faut ici lancer la commande : 

    mvn compile exec:java -Dexec.args="dbupgrade"

15/06/2018

01/06/2018

<!-- used for ldap search on /manager/ldapSearch - super-manager only --><bean id="ldapPersonService" class="org.esupportail.sgc.services.ldap.LdapPersonService">     <property name="ldapTemplate" ref="ldapTemplate"/>     <property name="ldapTemplates">         <map>             <entry key="Ldap Université de Ville" value-ref="ldapTemplate"/>             <entry key="Ldap Comue" value-ref="comueLdapTemplate"/>         </map>     </property></bean>     <bean id="shibUserInfoService" class="org.esupportail.sgc.services.userinfos.ShibUserInfoService" p:order="1">     <property name="sgcParam2requestHeader">         <map>             <entry key="email" value="mail"/>             <entry key="firstname" value="givenname"/>             <entry key="name" value="sn"/>             <entry key="eduPersonPrimaryAffiliation" value="eduPersonPrimaryAffiliation"/>             <entry key="supannEtuId" value="supannEtuId"/>             <entry key="supannEmpId" value="supannEmpId"/>             <entry key="supannEtuEtape" value="supannEtuEtape"/>             <entry key="supannEntiteAffectationPrincipale" value="supannEntiteAffectationPrincipale"/>             <entry key="supannEtablissement" value="supannEtablissement"/>             <entry key="supannCodeINE" value="supannCodeINE"/>             <entry key="schacDateOfBirth" value="schacDateOfBirth"/>             <entry key="recto2" value="givenname"/>             <entry key="recto3" value="sn"/>         </map>     </property>   </bean>   <bean id="ldapContextSourcePool" class="org.springframework.ldap.pool.factory.PoolingContextSource">     <property name="contextSource" ref="ldapContextSource" />     <property name="dirContextValidator" ref="dirContextValidator"/>     <property name="testWhileIdle" value="true"/>     <property name="testOnBorrow" value="true"/> </bean>  <bean id="dirContextValidator"  class="org.springframework.ldap.pool.validation.DefaultDirContextValidator" />   <bean id="ldapContextSource"     class="org.springframework.ldap.core.support.LdapContextSource">     <property name="url" value="ldap://ldap.univ-ville.fr" />     <property name="base" value="dc=univ-ville,dc=fr" />     <property name="userDn" value="cn=admin,dc=univ-ville,dc=fr" />     <property name="password" value="XXXXXXXX" /> </bean>      <bean id="ldapTemplate" class="org.springframework.ldap.core.LdapTemplate">     <constructor-arg ref="ldapContextSourcePool" /> </bean>   <bean id="ldapUserInfoService" class="org.esupportail.sgc.services.userinfos.LdapUserInfoService" p:order="2">     <property name="eppnFilter" value=".*@univ-ville.fr"/>     <property name="ldapTemplate" ref="ldapTemplate"/>     <property name="sgcParam2ldapAttr">         <map>             <entry key="email" value="mail"/>             <entry key="eduPersonPrimaryAffiliation" value="eduPersonPrimaryAffiliation"/>             <entry key="supannEtuId" value="supannEtuId"/>             <entry key="supannEmpId" value="supannEmpId"/>             <entry key="supannCodeINE" value="supannCodeINE"/>             <entry key="supannEntiteAffectationPrincipale" value="supannEntiteAffectationPrincipale"/>             <entry key="firstname" value="givenname"/>             <entry key="name" value="sn"/>             <entry key="schacDateOfBirth" value="schacDateOfBirth"/>             <entry key="supannEtablissement" value="supannEtablissement"/>             <entry key="supannRefId4ExternalCard" value="supannRefId"/>             <entry key="jpegPhoto4ExternalCard" value="jpegPhoto"/>             <entry key="recto3" value="givenname"/>             <entry key="recto2" value="sn"/>             <entry key="schacExpiryDate" value="schacExpiryDate"/>         </map>     </property>   </bean>   <bean id="groupService" class="org.esupportail.sgc.services.ldap.LdapGroupService">     <property name="ldapTemplate" ref="ldapTemplate"/>     <property name="groupSearchBase" value="ou=groups" />     <property name="groupSearchFilter" value="member={0}"/>     <property name="memberSearchBase" value="ou=people"/>     <property name="memberSearchFilter" value="memberOf={0}"/> </bean> <!-- Exemple de sqlUserInfoService. Recupécation des informations utilisateur via une requete SQL -->  <bean class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close" id="mysqlDataSource">     <property name="driverClassName" value="com.mysql.jdbc.Driver"/>     <property name="url" value="jdbc:mysql://mysql.univ-ville.fr:3306/database"/>     <property name="username" value="admin"/>     <property name="password" value="xxxxxxxx"/>     <property name="testOnBorrow" value="true" />     <property name="testOnReturn" value="true" />     <property name="testWhileIdle" value="true" />     <property name="timeBetweenEvictionRunsMillis" value="1800000" />     <property name="numTestsPerEvictionRun" value="3" />     <property name="minEvictableIdleTimeMillis" value="1800000" />     <property name="validationQuery" value="SELECT version();" /> </bean>   <bean id="univvilleUserInfoService" class="org.esupportail.sgc.services.userinfos.SqlUserInfoService" p:order="3">     <property name="eppnFilter" value=".*@univ-ville.fr"/>     <property name="dataSource" ref="mysqlDataSource"/>     <property name="sqlQuery" value="select ligneTitre as recto1,         nom as recto2,         prenom as recto3,         dateNaissance as recto4,         identifiant as recto5,         ligneAnneeUniv as recto7,         divers1 as verso1,         divers2 as verso2,         divers3 as verso3,         divers4 as verso4,         anneeUniv as verso5,         typepopulationcrous as referenceStatut,         indiceinm as indice,         concat(replace(datefindroits,'-',''),'235959Z') as schacExpiryDate,         leocode as secondaryId,         adresseFilterLibelle as address         from SgcLeoCarte where eppn=?"/> </bean>   <!-- On s'assure que eduPersonPrimaryAffiliation est conservé On fait également en sorte de toujours conserver une email, même si celui-ci n'est plus valide : le crous exige qu'un compte ait toujours un email de présent --> <bean id="spelUserInfoServiceEPPA" class="org.esupportail.sgc.services.userinfos.SpelUserInfoService" p:order="4">     <property name="sgcParam2spelExp">         <map>             <entry key="eduPersonPrimaryAffiliation" value="#userInfosInComputing['eduPersonPrimaryAffiliation'] == Null or #userInfosInComputing['eduPersonPrimaryAffiliation'] == '' ?                         #user.eduPersonPrimaryAffiliation : #userInfosInComputing['eduPersonPrimaryAffiliation'] "/>             <entry key="email" value="#userInfosInComputing['email'] != Null and #userInfosInComputing['email'] matches '.*@.*' ? #userInfosInComputing['email'] : #user.email"/>         </map>     </property>   </bean>   <!-- On calcule l'institute en fonction de l'eppn On calcule le userType en fonction de eduPersonPrimaryAffiliation On calcule le template de la carte en fonction de l'eppn --> <bean id="spelUserInfoService" class="org.esupportail.sgc.services.userinfos.SpelUserInfoService" p:order="5">     <property name="sgcParam2spelExp">         <map>             <entry key="institute" value="                 #user.eppn matches '.*@univ-ville.fr' ? 'Université de Ville' :                 #user.eppn matches '.*@univ-village.fr' ? 'Université du Village' :                 #user.eppn matches '.*@ecole-ville.fr' ? 'Ecolde de Ville' :                 #user.eppn matches '.*@comue.fr' ? 'COMUE' :                 'Extérieur'"/>             <entry key="userType" value="!(#user.eppn matches '.*@univ-ville.fr') ? 'Ext' :                 #userInfosInComputing['eduPersonPrimaryAffiliation'] == 'student' ? 'E' :                 #userInfosInComputing['eduPersonPrimaryAffiliation'] == 'staff' or #userInfosInComputing['eduPersonPrimaryAffiliation'] == 'teacher' or #userInfosInComputing['eduPersonPrimaryAffiliation'] == 'employee' ? 'P' : 'I'"/>             <entry key="template" value="#user.eppn matches '.*@univ-ville.fr' ? 'univ-ville' : 'undefined'"/>         </map>     </property>   </bean>   <!-- Si recto1 et recot4 non trouvé (dans la Base de Données ici) on les calcule en fonction du userType et de schacDateOfBirth on reformatte recto7 : 2017/2018 -> 2017<br/>2018 - cf propriété recto7Replace donnée dans sgc.properties --> <bean id="spelUserInfoService2" class="org.esupportail.sgc.services.userinfos.SpelUserInfoService" p:order="6">     <property name="sgcParam2spelExp">         <map>             <entry key="recto1" value="#userInfosInComputing['recto1'] != Null ? #userInfosInComputing['recto1'] :                 #userInfosInComputing['userType']  == 'E' ? 'étudiant' :                 #userInfosInComputing['userType'] == 'P' ? 'professionnelle' :                 #userInfosInComputing['userType'] == 'I' ? 'invité' :                  'extérieur'"/>             <entry key="recto4" value="#userInfosInComputing['recto4'] != Null ? #userInfosInComputing['recto4'] :                 #userInfosInComputing['schacDateOfBirth']  != Null ? 'Né le : ' + #dateUtils.schadDateOfBirthDay2FrenchDate(#userInfosInComputing['schacDateOfBirth']) : ''"/>             <entry key="recto7" value="${recto7Replace}"/>         </map>     </property>   </bean>  <!-- requestFree à false pour les étudiants ayant une carte de moins de 3ans *par rapport au 6 juillet de l'année de demande de la carte*  les cartes avant le 29/06/2018 (anciennes leocartes) ne sont pas prises en compte --> <bean id="requestNotFreeUserInfoService" class="org.esupportail.sgc.services.userinfos.SqlUserInfoService" p:order="8">     <property name="eppnFilter" value=".*@univ-ville.fr"/>     <property name="dataSource" ref="dataSource"/>     <property name="sqlQuery" value="select (not exists (select c.id from card as c,         user_account as u         where c.request_date > (select x from (SELECT to_date('06.07.' || date_part('year', current_timestamp)-2, 'DD.MM.YYYY') as x         union SELECT to_date('06.07.' || date_part('year', current_timestamp)-3, 'DD.MM.YYYY') as x) AS d         where current_timestamp-d.x > INTERVAL '2 year' order by x desc limit 1)         and c.eppn=u.eppn and u.edu_person_primary_affiliation='student'            and c.request_date > '2018-05-28'                 and u.eppn = ?)) ::text as requestFree"/> </bean>     <bean id="comueLdapContextSourcePool" class="org.springframework.ldap.pool.factory.PoolingContextSource">   <property name="contextSource" ref="comueLdapContextSource" />   <property name="dirContextValidator" ref="comueDirContextValidator"/>   <property name="testWhileIdle" value="true"/>   <property name="testOnBorrow" value="true"/></bean> <bean id="comueDirContextValidator"      class="org.springframework.ldap.pool.validation.DefaultDirContextValidator" />   <bean id="comueLdapContextSource"     class="org.springframework.ldap.core.support.LdapContextSource">     <property name="url" value="ldaps://ldap.comue.fr" />     <property name="base" value="dc=comue,dc=fr" />     <property name="userDn" value="cn=esup-sgc-univ-ville,ou=system,dc=comue,dc=fr" />     <property name="password" value="XXXXXXXX" /> </bean>      <bean id="comueLdapTemplate" class="org.springframework.ldap.core.LdapTemplate">     <constructor-arg ref="comueLdapContextSourcePool" /> </bean>   <bean id="comueLdapUserInfoService" class="org.esupportail.sgc.services.userinfos.LdapUserInfoService" p:order="2">     <property name="eppnFilter" value="^((?!@univ-ville\.fr).)*$"/>     <property name="ldapTemplate" ref="comueLdapTemplate"/>     <property name="sgcParam2ldapAttr">         <map>             <entry key="email" value="mail"/>             <entry key="eduPersonPrimaryAffiliation" value="eduPersonPrimaryAffiliation"/>             <entry key="firstname" value="givenname"/>             <entry key="name" value="sn"/>             <entry key="schacDateOfBirth" value="schacDateOfBirth"/>             <entry key="supannEtablissement" value="supannEtablissement"/>             <entry key="supannRefId4ExternalCard" value="supannRefId"/>             <entry key="jpegPhoto4ExternalCard" value="jpegPhoto"/>             <entry key="recto3" value="givenname"/>             <entry key="recto2" value="sn"/>             <entry key="schacExpiryDate" value="schacExpiryDate"/>         </map>     </property>   </bean>   <bean id="comueSpelUserInfoService" class="org.esupportail.sgc.services.userinfos.SpelUserInfoService" p:order="3">     <property name="eppnFilter" value="^((?!@univ-ville\.fr).)*$"/>     <property name="sgcParam2spelExp">         <map>             <entry key="secondaryId" value="#user.eppn"/>         </map>     </property>   </bean>     <bean id="cardIdsService" class="org.esupportail.sgc.services.cardid.CardIdsService">     <property name="cardIdServices">         <list>             <bean class="org.esupportail.sgc.services.cardid.ComueNuAccessControlCardIdService">                 <!-- warning : access-control is a keyword for access-control services :                     org.esupportail.sgc.services.ac.AccessControlService.AC_APP_NAME = 'access-control'                  -->                 <property name="appName" value="access-control"/>                 <property name="idCounterBegin" value="XXXXXXXXXXXXXXXX"/>                 <property name="postgresqlSequence" value="card_sequence"/>             </bean>             <bean class="org.esupportail.sgc.services.cardid.ComueNuBuCardIdService">                 <property name="appName" value="bu"/>             </bean>             <bean class="org.esupportail.sgc.services.cardid.CsnDomainCardIdService">                 <property name="appName" value="csn-domain"/>             </bean>         </list>     </property> </bean>   <bean id="esupNfcTagService" class="org.esupportail.sgc.services.EsupNfcTagService">     <property name="restTemplate" ref="restTemplate"/>     <property name="webUrl" value="https://esup-nfc-tag.univ-ville.fr"/>     <property name="applicationName" value="Ecriture SGC"/>       <property name="location" value="Encodage ESUP SGC"/> </bean>   <bean id="ldapAdminContextSourcePool" class="org.springframework.ldap.pool.factory.PoolingContextSource">     <property name="contextSource" ref="ldapAdminContextSource" />     <property name="dirContextValidator" ref="dirContextValidator"/>     <property name="testWhileIdle" value="true"/>     <property name="testOnBorrow" value="true"/> </bean>   <bean id="ldapAdminContextSource"     class="org.springframework.ldap.core.support.LdapContextSource">     <property name="url" value="ldap://ldap.univ-ville.fr" />     <property name="base" value="dc=univ-ville,dc=fr" />     <property name="userDn" value="cn=admin,dc=univ-ville,dc=fr" />     <property name="password" value="XXXXXXXX" /> </bean>      <bean id="ldapAdminTemplate" class="org.springframework.ldap.core.LdapTemplate">     <constructor-arg ref="ldapAdminContextSourcePool" /> </bean>   <bean id="ldapValidateService" class="org.esupportail.sgc.services.ldap.LdapValidateService">     <property name="ldapTemplate" ref="ldapAdminTemplate"/>     <property name="peopleSearchFilter" value="(eduPersonPrincipalName={0})"/>     <property name="ldapCardIdsMappingMultiValues">         <map>             <entry key="swissEduPersonCardUID">                 <list>                     <value>%reverse_csn%@ISO15693</value>                 </list>             </entry>             <entry key="supannRefId">                 <list>                     <value>{ISO15693}%csn%</value>                     <value>{LEOCARTE:ACCESS-CONTROL}%access-control%</value>                 </list>             </entry>         </map>     </property>          <!--     <property name="ldapCardIdsMappingValue">         <map>             <entry key="jpegPhoto" value="%photo%"/>         </map>         </property>         --> </bean>   <bean id="adContextSourcePool" class="org.springframework.ldap.pool.factory.PoolingContextSource">     <property name="contextSource" ref="adContextSource" />     <property name="dirContextValidator" ref="dirContextValidator"/>     <property name="testWhileIdle" value="true"/>     <property name="testOnBorrow" value="true"/> </bean>    <bean id="adContextSource"     class="org.springframework.ldap.core.support.LdapContextSource">     <property name="url" value="ldaps://ad.univ-ville.fr:636" />     <property name="base" value="DC=ur,DC=univ-ville,DC=fr"/>     <property name="pooled" value="true" />     <property name="userDn"    value="cn=Administrateur,cn=users,dc=ur,dc=univ-ville,dc=fr"/>     <property name="password" value="XXXXXXXX" /> </bean>   <bean id="adLdapTemplate" class="org.springframework.ldap.core.LdapTemplate">      <constructor-arg ref="adContextSourcePool" />     <property name="ignorePartialResultException" value="true"/> </bean> <bean id="adValidateService" class="org.esupportail.sgc.services.ldap.LdapValidateService">     <property name="ldapTemplate" ref="adLdapTemplate"/>     <property name="peopleSearchFilter" value="(&amp;(objectClass=person)(cn={1}))"/>     <property name="ldapCardIdsMappingValue">         <map>             <entry key="pager">                 <value>%csn%</value>             </entry>         </map>     </property> </bean> <bean id="ipService" class="org.esupportail.sgc.services.IpService">     <property name="maps">         <bean class="org.springframework.beans.factory.config.PropertiesFactoryBean">             <property name="location" value="classpath:ip.properties"/>         </bean>     </property> </bean> <bean class="org.springframework.mail.javamail.JavaMailSenderImpl" id="mailSender">     <property name="host" value="${email.host}"/>     <property name="protocol" value="${email.protocol}"/> </bean>   <bean id="emailService" class="org.esupportail.sgc.services.EmailService">     <property name="mailSender" ref="mailSender"/>     <property name="isEnabled" value="true"/> </bean>

  • Aucune étiquette