1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| <security:http pattern="/login" security="none"></security:http>
<security:http auto-config="true" use-expressions="true">
<security:access-denied-handler error-page="/403"/>
<security:session-management session-fixation-protection="none">
<security:concurrency-control expired-url="/login?login_error=2" />
</security:session-management>
<security:intercept-url pattern="/" access="hasAnyRole('ROLE_USER','ROLE_ADMIN','ROLE_RH')" />
<security:intercept-url pattern="/choix" access="hasAnyRole('ROLE_USER','ROLE_ADMIN','ROLE_RH')" />
<security:intercept-url pattern="/list" access="hasAnyRole('ROLE_ADMIN','ROLE_RH')" />
<security:intercept-url pattern="/listDemandeConge" access="hasRole('ROLE_USER','ROLE_RH','ROLE_ADMIN')" />
<security:intercept-url pattern="/addcategorie" access="hasRole('ROLE_ACHAT')" />
<security:form-login login-page="/login" login-processing-url="/login.do"
default-target-url="/" always-use-default-target="true"
username-parameter="username" password-parameter="password" authentication-failure-url="/login?error=1"/>
</security:http>
<security:authentication-manager>
<security:authentication-provider>
<security:password-encoder hash="md5"></security:password-encoder>
<security:jdbc-user-service data-source-ref="dataSource"
users-by-username-query="select Login, Password, CASE ENABLED WHEN 'active' THEN 'true' ELSE 'false' END 'ENABLED' from Utilisateur where Login=?"
authorities-by-username-query="select us.Login, ur.Libelle_Profil from Utilisateur us, Profil ur
where us.id_utilisateur = ur.id_utilisateur and us.Login =? " />
</security:authentication-provider>
</security:authentication-manager> |
Partager