bug submit form user registration

bug cache password
jstl fn: ajoute
mise en forme user registration + message ok/maj
retablissement de l'ancien acegicontext.xml
This commit is contained in:
Nicolas Michard
2008-02-16 21:02:38 +00:00
parent 04fc7f9523
commit 07052e97c2
11 changed files with 220 additions and 59 deletions

View File

@@ -81,20 +81,21 @@ http://www.springframework.org/schema/beans http://www.springframework.org/schem
<!-- </property>-->
</bean>
<bean id="accessDecisionManager" class="org.acegisecurity.vote.AffirmativeBased">
<property name="allowIfAllAbstainDecisions" value="false"/>
<property name="decisionVoters">
<list>
<bean class="org.acegisecurity.vote.RoleVoter"/>
<bean class="org.acegisecurity.vote.AuthenticatedVoter"/>
</list>
</property>
</bean>
<!-- AUTHORIZATION SERVICES -->
<bean id="filterInvocationInterceptor" class="org.acegisecurity.intercept.web.FilterSecurityInterceptor">
<property name="authenticationManager" ref="authenticationManager"/>
<property name="accessDecisionManager" ref="accessDecisionManager"/>
<property name="accessDecisionManager">
<bean class="org.acegisecurity.vote.AffirmativeBased">
<property name="allowIfAllAbstainDecisions" value="false"/>
<property name="decisionVoters">
<list>
<bean class="org.acegisecurity.vote.RoleVoter"/>
<bean class="org.acegisecurity.vote.AuthenticatedVoter"/>
</list>
</property>
</bean>
</property>
<property name="objectDefinitionSource">
<value>
CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
@@ -106,18 +107,6 @@ http://www.springframework.org/schema/beans http://www.springframework.org/schem
</property>
</bean>
<bean id="SecurityAnnotationAttributes" class="org.acegisecurity.annotation.SecurityAnnotationAttributes"/>
<bean id="MethodDefinitionAttributes" class="org.acegisecurity.intercept.method.MethodDefinitionAttributes">
<property name="attributes"><ref local="SecurityAnnotationAttributes"/></property>
</bean>
<bean id="methodInvocationInterceptor" class="org.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor">
<property name="validateConfigAttributes"><value>true</value></property>
<property name="authenticationManager" ref="authenticationManager"/>
<property name="accessDecisionManager" ref="accessDecisionManager"/>
<property name="objectDefinitionSource" ref="MethodDefinitionAttributes"/>
</bean>
<!-- LOGOUT -->
<bean id="logoutFilter" class="org.acegisecurity.ui.logout.LogoutFilter">
<constructor-arg value="/index.jsp"/>

View File

@@ -86,7 +86,15 @@ form.register.error.firstNameEmpty=First name is required
form.register.error.lastNameEmpty=Last name is required
form.register.error.passwordEmpty=The password can't be empty
form.register.error.alreadyExists=A user with this login already exists. Please check you haven't already registered or change your login.
form.link.back=Back
form.label.newaccount=You want post an article and participate at one conference ? so create your account !
form.label.message=NOTE: you have already an account ? Please connect you to the
form.label.linkPage=opening session page
form.field.account=Your account
form.field.personal=Personal details
form.field.necessary=* Required informations
message.account.validate=Account created successfully. You can now connect at this.
message.account.maj=Your account was indeed updated.
###################
# FORGOT USER

View File

@@ -2,4 +2,5 @@
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="authz" uri="http://acegisecurity.org/authz" %>
<%@ taglib prefix="authz" uri="http://acegisecurity.org/authz" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

View File

@@ -6,6 +6,15 @@
<h4 class="title">Conference's list</h4>
<c:if test="${ac != null}">
<p class="formHelp">
<c:choose>
<c:when test="${ac == 2}"><fmt:message key="message.account.validate" /></c:when>
<c:when test="${ac == 1}"><fmt:message key="message.account.maj" /></c:when>
</c:choose>
</p>
</c:if>
<c:if test="${errorMessage != null}">
<div class="errorBox">
<c:choose>
@@ -41,7 +50,9 @@
${conference.title} - In this conference you are:
<c:forEach items="${listRole}" var="role">
<c:if test="${conference.id == role.conference.id}">
${role.type}
${fn:toLowerCase(role.type)}
</c:if>
</c:forEach>
</c:when>

View File

@@ -5,33 +5,76 @@
<body>
<h4 class="title"><fmt:message key="register.title" /></h4>
<form:form method="post" commandName="registerUser">
<div class="user_new">
<fmt:message key="form.label.newaccount" />
</div>
<fmt:message key="form.label.message" />
<a href="<c:url value="login.htm"/>" /><fmt:message key="form.label.linkPage" /></a>
<br />
<form:form method="post" commandName="registerUser" id="account_data">
<form:hidden path="isNew"/>
<authz:authorize ifAllGranted="ROLE_ANONYMOUS">
<form:label path="login"><fmt:message key="form.register.user.login" /></form:label> <form:input path="login" disabled="false" /> <span class="formError"><form:errors path="login" /></span><br/><br />
</authz:authorize>
<authz:authorize ifNotGranted="ROLE_ANONYMOUS">
<form:label path="login"><fmt:message key="form.register.user.login" /></form:label> <form:input path="login" disabled="true"/> <span class="formError"><form:errors path="login" /></span><br/><br />
</authz:authorize>
<p class="legend"><fmt:message key="form.field.account" /></p>
<fieldset>
<span class="info"><fmt:message key="form.field.necessary" /></span>
<div>
<form:label path="login"><fmt:message key="form.register.user.login" /></form:label>
<authz:authorize ifNotGranted="ROLE_ANONYMOUS">
<form:input path="login" disabled="true"/>*
</authz:authorize>
<authz:authorize ifAllGranted="ROLE_ANONYMOUS">
<form:input path="login" disabled="false"/>*
</authz:authorize>
<span class="formError"><form:errors path="login" /></span>
</div>
<div>
<form:label path="password"><fmt:message key="form.register.user.password" /></form:label>
<form:password path="password" showPassword="true"/>*
<span class="formError"><form:errors path="password" /></span>
</div>
<div>
<form:label path="passwordConfirm"><fmt:message key="form.register.user.passwordConfirm" /></form:label>
<form:password path="passwordConfirm" showPassword="true"/>*
</div>
</fieldset>
<form:label path="email"><fmt:message key="form.register.user.email" /></form:label> <form:input path="email"/> <span class="formError"><form:errors path="email" /></span><br/><br />
<form:label path="password"><fmt:message key="form.register.user.password" /></form:label> <form:password path="password" showPassword="true"/> <span class="formError"><form:errors path="password" /></span><br/><br />
<form:label path="passwordConfirm"><fmt:message key="form.register.user.passwordConfirm" /></form:label> <form:password path="passwordConfirm" showPassword="true"/><br/><br />
<p class="legend"><fmt:message key="form.field.personal" /></p>
<fieldset>
<div>
<form:label path="firstName"><fmt:message key="form.register.user.firstName" /></form:label>
<form:input path="firstName"/>*
<span class="formError"><form:errors path="firstName" /></span>
</div>
<div>
<form:label path="lastName"><fmt:message key="form.register.user.lastName" /></form:label>
<form:input path="lastName"/>*
<span class="formError"><form:errors path="lastName" /></span>
</div>
<div>
<form:label path="email"><fmt:message key="form.register.user.email" /></form:label>
<form:input path="email"/>*
<span class="formError"><form:errors path="email" /></span>
</div>
<div>
<form:label path="organization"><fmt:message key="form.register.user.organization" /></form:label>
<form:input path="organization"/>
<span class="formError"><form:errors path="organization" /></span>
</div>
</fieldset>
<center>
<a class="back_link" href="<c:url value="login.htm"/>">
<fmt:message key="form.link.back" />
</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a class="register_link" href="javascript:document.getElementById('account_data').submit();">
<fmt:message key="login.label.continue" />
</a>
<form:label path="firstName"><fmt:message key="form.register.user.firstName" /></form:label> <form:input path="firstName"/> <span class="formError"><form:errors path="firstName" /></span><br/><br />
<form:label path="lastName"><fmt:message key="form.register.user.lastName" /></form:label> <form:input path="lastName"/> <span class="formError"><form:errors path="lastName" /></span><br/><br />
<form:label path="organization"><fmt:message key="form.register.user.organization" /></form:label> <form:input path="organization"/> <span class="formError"><form:errors path="organization" /></span><br/><br />
<input type="reset" value="<fmt:message key="button.reset" />"/>
<input type="submit" value="<fmt:message key="button.OK" />"/> <br/><br/>
</center>
</form:form>
<a href="<c:url value="main.htm"/>">Home</a>
</body>
</html>

View File

@@ -76,7 +76,6 @@
<property name="commandClass"
value="org.yacos.web.system.form.FormUser" />
<property name="formView" value="registerUser" />
<property name="successView" value="listConference.htm" />
<property name="userManager" ref="userManager" />
<property name="validator" ref="UserValidator"/>
</bean>