You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2014/09/26 12:53:27 UTC
svn commit: r1627743 - in /syncope/trunk: ./
common/src/main/java/org/apache/syncope/common/util/
console/src/main/java/org/apache/syncope/console/commons/
console/src/main/java/org/apache/syncope/console/pages/
console/src/main/java/org/apache/syncope...
Author: ilgrosso
Date: Fri Sep 26 10:53:26 2014
New Revision: 1627743
URL: http://svn.apache.org/r1627743
Log:
[SYNCOPE-135] Merge from 1_2_X
Added:
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ConfirmPasswordResetModalPage.java
- copied unchanged from r1627742, syncope/branches/1_2_X/console/src/main/java/org/apache/syncope/console/pages/ConfirmPasswordResetModalPage.java
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConfirmPasswordResetModalPage.html
- copied unchanged from r1627742, syncope/branches/1_2_X/console/src/main/resources/org/apache/syncope/console/pages/ConfirmPasswordResetModalPage.html
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConfirmPasswordResetModalPage.properties
- copied unchanged from r1627742, syncope/branches/1_2_X/console/src/main/resources/org/apache/syncope/console/pages/ConfirmPasswordResetModalPage.properties
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConfirmPasswordResetModalPage_it.properties
- copied unchanged from r1627742, syncope/branches/1_2_X/console/src/main/resources/org/apache/syncope/console/pages/ConfirmPasswordResetModalPage_it.properties
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ConfirmPasswordResetModalPage_pt_BR.properties
- copied unchanged from r1627742, syncope/branches/1_2_X/console/src/main/resources/org/apache/syncope/console/pages/ConfirmPasswordResetModalPage_pt_BR.properties
Modified:
syncope/trunk/ (props changed)
syncope/trunk/common/src/main/java/org/apache/syncope/common/util/AttributableOperations.java
syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/Constants.java
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Login.java
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/RequestPasswordResetModalPage.java
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResultStatusModalPage.java
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/SecurityQuestionPanel.java
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Login.html
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/RequestPasswordResetModalPage.properties
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/RequestPasswordResetModalPage_it.properties
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/RequestPasswordResetModalPage_pt_BR.properties
syncope/trunk/console/src/test/java/org/apache/syncope/console/ConfigurationTestITCase.java
syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/UserDataBinder.java
syncope/trunk/core/src/main/java/org/apache/syncope/core/workflow/user/activiti/ActivitiUserWorkflowAdapter.java
syncope/trunk/core/src/main/resources/mailTemplates/requestPasswordReset.html.vm
syncope/trunk/core/src/main/resources/mailTemplates/requestPasswordReset.txt.vm
syncope/trunk/pom.xml
Propchange: syncope/trunk/
------------------------------------------------------------------------------
Merged /syncope/branches/1_2_X:r1627039-1627742
Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/util/AttributableOperations.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/util/AttributableOperations.java?rev=1627743&r1=1627742&r2=1627743&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/util/AttributableOperations.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/util/AttributableOperations.java Fri Sep 26 10:53:26 2014
@@ -26,6 +26,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.commons.lang3.SerializationUtils;
+import org.apache.commons.lang3.StringUtils;
import org.apache.syncope.common.mod.AbstractAttributableMod;
import org.apache.syncope.common.mod.AbstractSubjectMod;
import org.apache.syncope.common.mod.AttributeMod;
@@ -236,8 +237,15 @@ public final class AttributableOperation
}
// 3. security question / answer
- result.setSecurityQuestion(updated.getSecurityQuestion());
- result.setSecurityAnswer(updated.getSecurityAnswer());
+ if (updated.getSecurityQuestion() == null) {
+ result.setSecurityQuestion(null);
+ result.setSecurityAnswer(null);
+ } else if (!updated.getSecurityQuestion().equals(original.getSecurityQuestion())
+ || StringUtils.isNotBlank(updated.getSecurityAnswer())) {
+
+ result.setSecurityQuestion(updated.getSecurityQuestion());
+ result.setSecurityAnswer(updated.getSecurityAnswer());
+ }
// 4. memberships
Map<Long, MembershipTO> updatedMembs = updated.getMembershipMap();
Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/Constants.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/Constants.java?rev=1627743&r1=1627742&r2=1627743&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/Constants.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/Constants.java Fri Sep 26 10:53:26 2014
@@ -38,6 +38,8 @@ public final class Constants {
public static final String ERROR = "error";
+ public static final String PARAM_PASSWORD_RESET_TOKEN = "pwdResetToken";
+
public static final String PREF_USERS_DETAILS_VIEW = "users.details.view";
public static final String PREF_USERS_ATTRIBUTES_VIEW = "users.attributes.view";
Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Login.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Login.java?rev=1627743&r1=1627742&r2=1627743&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Login.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Login.java Fri Sep 26 10:53:26 2014
@@ -21,6 +21,7 @@ package org.apache.syncope.console.pages
import java.security.AccessControlException;
import java.util.List;
import java.util.Locale;
+import org.apache.commons.lang3.StringUtils;
import org.apache.syncope.common.services.EntitlementService;
import org.apache.syncope.common.wrap.EntitlementTO;
import org.apache.syncope.common.to.UserTO;
@@ -31,23 +32,29 @@ import org.apache.syncope.console.pages.
import org.apache.syncope.console.rest.UserSelfRestClient;
import org.apache.syncope.console.wicket.ajax.markup.html.ClearIndicatingAjaxLink;
import org.apache.syncope.console.wicket.markup.html.form.LinkPanel;
+import org.apache.wicket.Component;
import org.apache.wicket.Page;
+import org.apache.wicket.ajax.AbstractDefaultAjaxBehavior;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.ajax.markup.html.form.AjaxButton;
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.head.IHeaderResponse;
+import org.apache.wicket.markup.head.JavaScriptHeaderItem;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.ChoiceRenderer;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.PasswordTextField;
+import org.apache.wicket.markup.html.form.StatelessForm;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.panel.Fragment;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.request.cycle.RequestCycle;
import org.apache.wicket.request.mapper.parameter.PageParameters;
import org.apache.wicket.spring.injection.annot.SpringBean;
@@ -78,7 +85,7 @@ public class Login extends WebPage {
@SpringBean
private UserSelfRestClient userSelfRestClient;
- private final Form<Void> form;
+ private final StatelessForm<Void> form;
private final TextField<String> userIdField;
@@ -90,11 +97,12 @@ public class Login extends WebPage {
public Login(final PageParameters parameters) {
super(parameters);
+ setStatelessHint(true);
feedbackPanel = new NotificationPanel(Constants.FEEDBACK);
add(feedbackPanel);
- form = new Form<Void>("login");
+ form = new StatelessForm<Void>("login");
userIdField = new TextField<String>("userId", new Model<String>());
userIdField.setMarkupId("userId");
@@ -190,13 +198,13 @@ public class Login extends WebPage {
}
add(selfRegFrag);
- // Modal window for password reset
- final ModalWindow pwdResetModalWin = new ModalWindow("pwdResetModal");
- pwdResetModalWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
- pwdResetModalWin.setInitialHeight(PWD_RESET_WIN_HEIGHT);
- pwdResetModalWin.setInitialWidth(PWD_RESET_WIN_WIDTH);
- pwdResetModalWin.setCookieName("pwd-reset-modal");
- add(pwdResetModalWin);
+ // Modal window for password reset request
+ final ModalWindow pwdResetReqModalWin = new ModalWindow("pwdResetReqModal");
+ pwdResetReqModalWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ pwdResetReqModalWin.setInitialHeight(PWD_RESET_WIN_HEIGHT);
+ pwdResetReqModalWin.setInitialWidth(PWD_RESET_WIN_WIDTH);
+ pwdResetReqModalWin.setCookieName("pwd-reset-req-modal");
+ add(pwdResetReqModalWin);
Fragment pwdResetFrag;
if (userSelfRestClient.isPasswordResetAllowed()) {
@@ -208,7 +216,7 @@ public class Login extends WebPage {
@Override
protected void onClickInternal(final AjaxRequestTarget target) {
- pwdResetModalWin.setPageCreator(new ModalWindow.PageCreator() {
+ pwdResetReqModalWin.setPageCreator(new ModalWindow.PageCreator() {
private static final long serialVersionUID = -7834632442532690940L;
@@ -217,21 +225,22 @@ public class Login extends WebPage {
// anonymous authentication needed for password reset request
authenticate(anonymousUser, anonymousKey);
- return new RequestPasswordResetModalPage(pwdResetModalWin);
+ return new RequestPasswordResetModalPage(pwdResetReqModalWin);
}
});
- pwdResetModalWin.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
+ pwdResetReqModalWin.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
private static final long serialVersionUID = 8804221891699487139L;
@Override
public void onClose(final AjaxRequestTarget target) {
SyncopeSession.get().invalidate();
+ setResponsePage(Login.class);
}
});
- pwdResetModalWin.show(target);
+ pwdResetReqModalWin.show(target);
}
};
pwdResetLink.add(new Label("linkTitle", getString("passwordReset")));
@@ -243,6 +252,55 @@ public class Login extends WebPage {
pwdResetFrag = new Fragment("passwordReset", "pwdResetNotAllowed", this);
}
add(pwdResetFrag);
+
+ // Modal window for password reset confirm - automatically shown when token is available as request parameter
+ final String pwdResetToken = RequestCycle.get().getRequest().getRequestParameters().
+ getParameterValue(Constants.PARAM_PASSWORD_RESET_TOKEN).toOptionalString();
+ final ModalWindow pwdResetConfModalWin = new ModalWindow("pwdResetConfModal");
+ if (StringUtils.isNotBlank(pwdResetToken)) {
+ pwdResetConfModalWin.add(new AbstractDefaultAjaxBehavior() {
+
+ private static final long serialVersionUID = 3109256773218160485L;
+
+ @Override
+ protected void respond(final AjaxRequestTarget target) {
+ ModalWindow window = (ModalWindow) getComponent();
+ window.show(target);
+ }
+
+ @Override
+ public void renderHead(final Component component, final IHeaderResponse response) {
+ response.render(JavaScriptHeaderItem.forScript(getCallbackScript(), null));
+ }
+ });
+ }
+ pwdResetConfModalWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ pwdResetConfModalWin.setInitialHeight(PWD_RESET_WIN_HEIGHT);
+ pwdResetConfModalWin.setInitialWidth(PWD_RESET_WIN_WIDTH);
+ pwdResetConfModalWin.setCookieName("pwd-reset-conf-modal");
+ pwdResetConfModalWin.setPageCreator(new ModalWindow.PageCreator() {
+
+ private static final long serialVersionUID = -7834632442532690940L;
+
+ @Override
+ public Page createPage() {
+ // anonymous authentication needed for password reset confirm
+ authenticate(anonymousUser, anonymousKey);
+
+ return new ConfirmPasswordResetModalPage(pwdResetConfModalWin, pwdResetToken);
+ }
+ });
+ pwdResetConfModalWin.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
+
+ private static final long serialVersionUID = 8804221891699487139L;
+
+ @Override
+ public void onClose(final AjaxRequestTarget target) {
+ SyncopeSession.get().invalidate();
+ setResponsePage(Login.class);
+ }
+ });
+ add(pwdResetConfModalWin);
}
private void authenticate(final String username, final String password) {
Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/RequestPasswordResetModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/RequestPasswordResetModalPage.java?rev=1627743&r1=1627742&r2=1627743&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/RequestPasswordResetModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/RequestPasswordResetModalPage.java Fri Sep 26 10:53:26 2014
@@ -18,10 +18,8 @@
*/
package org.apache.syncope.console.pages;
-import static org.apache.syncope.console.pages.AbstractBasePage.FORM;
-import static org.apache.syncope.console.pages.AbstractBasePage.LOG;
-
import org.apache.syncope.common.to.SecurityQuestionTO;
+import org.apache.syncope.common.to.UserTO;
import org.apache.syncope.console.commons.Constants;
import org.apache.syncope.console.rest.SecurityQuestionRestClient;
import org.apache.syncope.console.wicket.markup.html.form.AjaxTextFieldPanel;
@@ -31,6 +29,7 @@ import org.apache.wicket.ajax.markup.htm
import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.StatelessForm;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.ResourceModel;
import org.apache.wicket.spring.injection.annot.SpringBean;
@@ -46,7 +45,7 @@ public class RequestPasswordResetModalPa
super();
setOutputMarkupId(true);
- final Form<?> form = new Form<Object>(FORM);
+ final StatelessForm<?> form = new StatelessForm<Object>(FORM);
form.setOutputMarkupId(true);
final AjaxTextFieldPanel securityQuestion =
@@ -92,13 +91,20 @@ public class RequestPasswordResetModalPa
protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
try {
userSelfRestClient.requestPasswordReset(username.getModelObject(), securityAnswer.getModelObject());
- window.close(target);
+
+ setResponsePage(new ResultStatusModalPage.Builder(window, new UserTO()).
+ mode(UserModalPage.Mode.SELF).build());
} catch (Exception e) {
LOG.error("While requesting password reset for {}", username.getModelObject(), e);
error(getString(Constants.ERROR) + ": " + e.getMessage());
feedbackPanel.refresh(target);
}
}
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ feedbackPanel.refresh(target);
+ }
};
form.add(submit);
form.setDefaultButton(submit);
Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResultStatusModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResultStatusModalPage.java?rev=1627743&r1=1627742&r2=1627743&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResultStatusModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResultStatusModalPage.java Fri Sep 26 10:53:26 2014
@@ -33,7 +33,6 @@ import org.apache.syncope.common.to.Prop
import org.apache.syncope.common.to.RoleTO;
import org.apache.syncope.common.to.UserTO;
import org.apache.syncope.common.types.PropagationTaskExecStatus;
-import org.apache.syncope.console.SyncopeSession;
import org.apache.syncope.console.commons.ConnIdSpecialAttributeName;
import org.apache.syncope.console.commons.Constants;
import org.apache.syncope.console.commons.status.Status;
@@ -135,10 +134,10 @@ public class ResultStatusModalPage exten
fragment.add(new Label("info",
((subject instanceof UserTO) && ((UserTO) subject).getUsername() != null)
- ? ((UserTO) subject).getUsername()
- : ((subject instanceof RoleTO) && ((RoleTO) subject).getName() != null)
- ? ((RoleTO) subject).getName()
- : String.valueOf(subject.getId())));
+ ? ((UserTO) subject).getUsername()
+ : ((subject instanceof RoleTO) && ((RoleTO) subject).getName() != null)
+ ? ((RoleTO) subject).getName()
+ : String.valueOf(subject.getId())));
final ListView<PropagationStatus> propRes = new ListView<PropagationStatus>("resources",
propagations) {
@@ -164,7 +163,7 @@ public class ResultStatusModalPage exten
attrhead.add(new Label("resource", propTO.getResource()));
attrhead.add(new Label("propagation", propTO.getStatus() == null
- ? "UNDEFINED" : propTO.getStatus().toString()));
+ ? "UNDEFINED" : propTO.getStatus().toString()));
final Image image;
final String alt, title;
@@ -243,9 +242,6 @@ public class ResultStatusModalPage exten
@Override
public void onClick(final AjaxRequestTarget target) {
- if (mode == UserModalPage.Mode.SELF && anonymousUser.equals(SyncopeSession.get().getUsername())) {
- SyncopeSession.get().invalidate();
- }
builder.window.close(target);
}
};
Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/SecurityQuestionPanel.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/SecurityQuestionPanel.java?rev=1627743&r1=1627742&r2=1627743&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/SecurityQuestionPanel.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/SecurityQuestionPanel.java Fri Sep 26 10:53:26 2014
@@ -55,6 +55,7 @@ public class SecurityQuestionPanel exten
final AjaxTextFieldPanel securityAnswer = new AjaxTextFieldPanel("securityAnswer", "securityAnswer",
new PropertyModel<String>(userTO, "securityAnswer"));
securityAnswer.getField().setOutputMarkupId(true);
+ securityAnswer.setEnabled(false);
add(securityAnswer);
final AjaxDropDownChoicePanel<Long> securityQuestion =
@@ -86,11 +87,12 @@ public class SecurityQuestionPanel exten
protected void onUpdate(final AjaxRequestTarget target) {
if (securityQuestion.getModelObject() == null) {
securityAnswer.setModelObject(null);
- target.add(SecurityQuestionPanel.this);
+ } else {
+ securityAnswer.setEnabled(true);
}
+ target.add(SecurityQuestionPanel.this);
}
});
add(securityQuestion);
}
-
}
Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Login.html
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Login.html?rev=1627743&r1=1627742&r2=1627743&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Login.html (original)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Login.html Fri Sep 26 10:53:26 2014
@@ -82,7 +82,8 @@ under the License.
<span wicket:id="passwordReset"/>
</wicket:fragment>
- <div wicket:id="pwdResetModal"></div>
+ <div wicket:id="pwdResetReqModal"></div>
+ <div wicket:id="pwdResetConfModal"></div>
</div>
</body>
</html>
Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/RequestPasswordResetModalPage.properties
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/RequestPasswordResetModalPage.properties?rev=1627743&r1=1627742&r2=1627743&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/RequestPasswordResetModalPage.properties (original)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/RequestPasswordResetModalPage.properties Fri Sep 26 10:53:26 2014
@@ -18,3 +18,4 @@ securityQuestion=Security question
title=Password reset
username=User
securityAnswer=Security answer
+submit=Submit
Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/RequestPasswordResetModalPage_it.properties
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/RequestPasswordResetModalPage_it.properties?rev=1627743&r1=1627742&r2=1627743&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/RequestPasswordResetModalPage_it.properties (original)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/RequestPasswordResetModalPage_it.properties Fri Sep 26 10:53:26 2014
@@ -18,3 +18,4 @@ securityQuestion=Domanda di sicurezza
title=Password smarrita
username=Utente
securityAnswer=Risposta di sicurezza
+submit=Invia
Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/RequestPasswordResetModalPage_pt_BR.properties
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/RequestPasswordResetModalPage_pt_BR.properties?rev=1627743&r1=1627742&r2=1627743&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/RequestPasswordResetModalPage_pt_BR.properties (original)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/RequestPasswordResetModalPage_pt_BR.properties Fri Sep 26 10:53:26 2014
@@ -18,3 +18,4 @@ securityQuestion=Pergunta de seguran\u00
title=Redefini\u00e7\u00e3o de senha
username=Usu\u00e1rio
securityAnswer=Resposta de seguran\u00e7a
+submit=Apresentar
Modified: syncope/trunk/console/src/test/java/org/apache/syncope/console/ConfigurationTestITCase.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/test/java/org/apache/syncope/console/ConfigurationTestITCase.java?rev=1627743&r1=1627742&r2=1627743&view=diff
==============================================================================
--- syncope/trunk/console/src/test/java/org/apache/syncope/console/ConfigurationTestITCase.java (original)
+++ syncope/trunk/console/src/test/java/org/apache/syncope/console/ConfigurationTestITCase.java Fri Sep 26 10:53:26 2014
@@ -74,7 +74,7 @@ public class ConfigurationTestITCase ext
selenium.waitForCondition("selenium.isElementPresent(\"//div[@id='tabs']\");", "30000");
- selenium.click("//div[@id='tabs']/ul/li[5]/a");
+ selenium.click("//div[@id='tabs']/ul/li[6]/a");
selenium.select("//div[@id='core']/div/span/table/tbody/tr/td[2]/select", "label=ERROR");
@@ -151,7 +151,7 @@ public class ConfigurationTestITCase ext
selenium.click("//div[@class='eventSelectionWidzard']/div[2]/div[3]/span/div/input");
- selenium.click("//div[2]/form/div[3]/ul/li[4]/a/span");
+ selenium.click("//div[2]/form/div[3]/ul/li[4]/a");
selenium.click("//div[2]/form/div[3]/div[4]/div/div/span/input");
Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/UserDataBinder.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/UserDataBinder.java?rev=1627743&r1=1627742&r2=1627743&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/UserDataBinder.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/UserDataBinder.java Fri Sep 26 10:53:26 2014
@@ -67,7 +67,7 @@ import org.springframework.transaction.a
public class UserDataBinder extends AbstractAttributableDataBinder {
private static final String[] IGNORE_USER_PROPERTIES = {
- "memberships", "attrs", "derAttrs", "virAttrs", "resources", "securityQuestion"
+ "memberships", "attrs", "derAttrs", "virAttrs", "resources", "securityQuestion", "securityAnswer"
};
@Autowired
Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/workflow/user/activiti/ActivitiUserWorkflowAdapter.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/workflow/user/activiti/ActivitiUserWorkflowAdapter.java?rev=1627743&r1=1627742&r2=1627743&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/workflow/user/activiti/ActivitiUserWorkflowAdapter.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/workflow/user/activiti/ActivitiUserWorkflowAdapter.java Fri Sep 26 10:53:26 2014
@@ -68,6 +68,7 @@ import org.apache.syncope.common.Syncope
import org.apache.syncope.core.persistence.beans.user.SyncopeUser;
import org.apache.syncope.core.persistence.dao.NotFoundException;
import org.apache.syncope.core.persistence.validation.attrvalue.ParsingValidationException;
+import org.apache.syncope.core.persistence.validation.entity.InvalidEntityException;
import org.apache.syncope.core.propagation.PropagationByResource;
import org.apache.syncope.core.rest.controller.UnauthorizedRoleException;
import org.apache.syncope.core.rest.data.UserDataBinder;
@@ -167,6 +168,8 @@ public class ActivitiUserWorkflowAdapter
throw (SyncopeClientException) e.getCause().getCause();
} else if (e.getCause().getCause() instanceof ParsingValidationException) {
throw (ParsingValidationException) e.getCause().getCause();
+ } else if (e.getCause().getCause() instanceof InvalidEntityException) {
+ throw (InvalidEntityException) e.getCause().getCause();
}
}
Modified: syncope/trunk/core/src/main/resources/mailTemplates/requestPasswordReset.html.vm
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/resources/mailTemplates/requestPasswordReset.html.vm?rev=1627743&r1=1627742&r2=1627743&view=diff
==============================================================================
--- syncope/trunk/core/src/main/resources/mailTemplates/requestPasswordReset.html.vm (original)
+++ syncope/trunk/core/src/main/resources/mailTemplates/requestPasswordReset.html.vm Fri Sep 26 10:53:26 2014
@@ -21,8 +21,8 @@ under the License.
<p>Hi,
a password reset was request for $user.getUsername().</p>
-<p>In order to complete this request, you need to provide the token<br/><br/>
-$input.get(0)</p>
+<p>In order to complete this request, you need to visit this
+<a href="http://localhost:9080/syncope-console/?pwdResetToken=$input.get(0)">link</a></p>.
<p>If you did not request this reset, just ignore the present e-mail.</p>
Modified: syncope/trunk/core/src/main/resources/mailTemplates/requestPasswordReset.txt.vm
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/resources/mailTemplates/requestPasswordReset.txt.vm?rev=1627743&r1=1627742&r2=1627743&view=diff
==============================================================================
--- syncope/trunk/core/src/main/resources/mailTemplates/requestPasswordReset.txt.vm (original)
+++ syncope/trunk/core/src/main/resources/mailTemplates/requestPasswordReset.txt.vm Fri Sep 26 10:53:26 2014
@@ -17,9 +17,9 @@
Hi,
a password reset was request for $user.getUsername().
-In order to complete this request, you need to provide the token
+In order to complete this request, you need to visit this link:
-$input.get(0)
+http://localhost:9080/syncope-console/?pwdResetToken=$input.get(0)
If you did not request this reset, just ignore the present e-mail.
Modified: syncope/trunk/pom.xml
URL: http://svn.apache.org/viewvc/syncope/trunk/pom.xml?rev=1627743&r1=1627742&r2=1627743&view=diff
==============================================================================
--- syncope/trunk/pom.xml (original)
+++ syncope/trunk/pom.xml Fri Sep 26 10:53:26 2014
@@ -1148,7 +1148,7 @@ under the License.
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
- <version>1.4.9</version>
+ <version>1.4.10</version>
<configuration>
<container>
<containerId>tomcat7x</containerId>