Author: ilgrosso
Date: Mon Sep 22 13:25:10 2014
New Revision: 1626769

URL: http://svn.apache.org/r1626769
Log:
[SYNCOPE-135] Merge from 1_2_X

Added:
    
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/SecurityQuestionModalPage.java
      - copied unchanged from r1626768, 
syncope/branches/1_2_X/console/src/main/java/org/apache/syncope/console/pages/SecurityQuestionModalPage.java
    
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/SecurityQuestionPanel.java
      - copied unchanged from r1626768, 
syncope/branches/1_2_X/console/src/main/java/org/apache/syncope/console/pages/panels/SecurityQuestionPanel.java
    
syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/SecurityQuestionRestClient.java
      - copied unchanged from r1626768, 
syncope/branches/1_2_X/console/src/main/java/org/apache/syncope/console/rest/SecurityQuestionRestClient.java
    
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/SecurityQuestionModalPage.html
      - copied unchanged from r1626768, 
syncope/branches/1_2_X/console/src/main/resources/org/apache/syncope/console/pages/SecurityQuestionModalPage.html
    
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/SecurityQuestionModalPage.properties
      - copied unchanged from r1626768, 
syncope/branches/1_2_X/console/src/main/resources/org/apache/syncope/console/pages/SecurityQuestionModalPage.properties
    
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/SecurityQuestionModalPage_it.properties
      - copied unchanged from r1626768, 
syncope/branches/1_2_X/console/src/main/resources/org/apache/syncope/console/pages/SecurityQuestionModalPage_it.properties
    
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/SecurityQuestionModalPage_pt_BR.properties
      - copied unchanged from r1626768, 
syncope/branches/1_2_X/console/src/main/resources/org/apache/syncope/console/pages/SecurityQuestionModalPage_pt_BR.properties
    
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/SecurityQuestionPanel.html
      - copied unchanged from r1626768, 
syncope/branches/1_2_X/console/src/main/resources/org/apache/syncope/console/pages/panels/SecurityQuestionPanel.html
    
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/SecurityQuestionPanel.properties
      - copied unchanged from r1626768, 
syncope/branches/1_2_X/console/src/main/resources/org/apache/syncope/console/pages/panels/SecurityQuestionPanel.properties
    
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/SecurityQuestionPanel_it.properties
      - copied unchanged from r1626768, 
syncope/branches/1_2_X/console/src/main/resources/org/apache/syncope/console/pages/panels/SecurityQuestionPanel_it.properties
    
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/SecurityQuestionPanel_pt_BR.properties
      - copied unchanged from r1626768, 
syncope/branches/1_2_X/console/src/main/resources/org/apache/syncope/console/pages/panels/SecurityQuestionPanel_pt_BR.properties
Modified:
    syncope/trunk/   (props changed)
    
syncope/trunk/client/src/main/java/org/apache/syncope/client/SyncopeClient.java
    
syncope/trunk/common/src/main/java/org/apache/syncope/common/util/AttributableOperations.java
    
syncope/trunk/console/src/main/java/org/apache/syncope/console/SyncopeSession.java
    
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Configuration.java
    
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/EditUserModalPage.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/NotificationModalPage.java
    
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/UserModalPage.java
    
syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ConfigurationRestClient.java
    
syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/NotificationRestClient.java
    
syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/UserSelfRestClient.java
    syncope/trunk/console/src/main/resources/authorizations.xml
    
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Configuration.html
    
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Configuration.properties
    
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Configuration_it.properties
    
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Configuration_pt_BR.properties
    
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Login.html
    
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Login.properties
    
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Login_it.properties
    
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Login_pt_BR.properties
    
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/UserModalPage.html
    
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/AccountInformationPanel.html
    
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/UserDetailsPanel.html
    
syncope/trunk/core/src/main/java/org/apache/syncope/core/services/UserSelfServiceImpl.java

Propchange: syncope/trunk/
------------------------------------------------------------------------------
  Merged /syncope/branches/1_2_X:r1626150-1626768

Modified: 
syncope/trunk/client/src/main/java/org/apache/syncope/client/SyncopeClient.java
URL: 
http://svn.apache.org/viewvc/syncope/trunk/client/src/main/java/org/apache/syncope/client/SyncopeClient.java?rev=1626769&r1=1626768&r2=1626769&view=diff
==============================================================================
--- 
syncope/trunk/client/src/main/java/org/apache/syncope/client/SyncopeClient.java 
(original)
+++ 
syncope/trunk/client/src/main/java/org/apache/syncope/client/SyncopeClient.java 
Mon Sep 22 13:25:10 2014
@@ -220,6 +220,17 @@ public class SyncopeClient {
     }
 
     /**
+     * Checks whether password reset is allowed by calling 
<tt>UserSelfService</tt>'s options.
+     *
+     * @return whether password reset is allowed
+     * @see UserSelfService#getOptions()
+     */
+    public boolean isPasswordResetAllowed() {
+        return 
Boolean.valueOf(restClientFactory.createServiceInstance(UserSelfService.class, 
mediaType, null, null).
+                
getOptions().getHeaderString(RESTHeaders.PASSWORDRESET_ALLOWED));
+    }
+
+    /**
      * Checks whether Activiti workflow is enabled for users / roles, by 
calling <tt>WorkflowService</tt>'s options.
      *
      * @param subjectType user / role

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=1626769&r1=1626768&r2=1626769&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
 Mon Sep 22 13:25:10 2014
@@ -224,8 +224,9 @@ public final class AttributableOperation
         diff(updated, original, result, incremental);
 
         // 1. password
-        if (updated.getPassword() != null && (original.getPassword() == null 
|| !original.getPassword().
-                equals(updated.getPassword()))) {
+        if (updated.getPassword() != null && (original.getPassword() == null
+                || !original.getPassword().equals(updated.getPassword()))) {
+
             result.setPassword(updated.getPassword());
         }
 
@@ -234,7 +235,11 @@ public final class AttributableOperation
             result.setUsername(updated.getUsername());
         }
 
-        // 3. memberships
+        // 3. security question / answer
+        result.setSecurityQuestion(updated.getSecurityQuestion());
+        result.setSecurityAnswer(updated.getSecurityAnswer());
+
+        // 4. memberships
         Map<Long, MembershipTO> updatedMembs = updated.getMembershipMap();
         Map<Long, MembershipTO> originalMembs = original.getMembershipMap();
 

Modified: 
syncope/trunk/console/src/main/java/org/apache/syncope/console/SyncopeSession.java
URL: 
http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/SyncopeSession.java?rev=1626769&r1=1626768&r2=1626769&view=diff
==============================================================================
--- 
syncope/trunk/console/src/main/java/org/apache/syncope/console/SyncopeSession.java
 (original)
+++ 
syncope/trunk/console/src/main/java/org/apache/syncope/console/SyncopeSession.java
 Mon Sep 22 13:25:10 2014
@@ -94,6 +94,13 @@ public class SyncopeSession extends WebS
         return client.isSelfRegistrationAllowed();
     }
 
+    public boolean isPasswordResetAllowed() {
+        SyncopeClient client = clients.isEmpty()
+                ? clientFactory.createAnonymous()
+                : clients.values().iterator().next();
+        return client.isPasswordResetAllowed();
+    }
+
     public boolean isActivitiEnabledFor(final SubjectType type) {
         SyncopeClient client = clients.isEmpty()
                 ? clientFactory.createAnonymous()

Modified: 
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Configuration.java
URL: 
http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Configuration.java?rev=1626769&r1=1626768&r2=1626769&view=diff
==============================================================================
--- 
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Configuration.java
 (original)
+++ 
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/Configuration.java
 Mon Sep 22 13:25:10 2014
@@ -37,6 +37,7 @@ import org.apache.syncope.common.types.L
 import org.apache.syncope.common.SyncopeClientException;
 import org.apache.syncope.common.to.AttributeTO;
 import org.apache.syncope.common.to.ConfTO;
+import org.apache.syncope.common.to.SecurityQuestionTO;
 import org.apache.syncope.console.commons.Constants;
 import org.apache.syncope.console.commons.HttpResourceStream;
 import org.apache.syncope.console.commons.PreferenceManager;
@@ -46,6 +47,7 @@ import org.apache.syncope.console.pages.
 import org.apache.syncope.console.rest.ConfigurationRestClient;
 import org.apache.syncope.console.rest.LoggerRestClient;
 import org.apache.syncope.console.rest.NotificationRestClient;
+import org.apache.syncope.console.rest.SecurityQuestionRestClient;
 import org.apache.syncope.console.rest.WorkflowRestClient;
 import 
org.apache.syncope.console.wicket.extensions.markup.html.repeater.data.table.CollectionPropertyColumn;
 import org.apache.syncope.console.wicket.markup.html.form.ActionLink;
@@ -96,6 +98,14 @@ public class Configuration extends BaseP
 
     private static final long serialVersionUID = -2838270869037702214L;
 
+    private static final int NOTIFICATION_WIN_HEIGHT = 500;
+
+    private static final int NOTIFICATION_WIN_WIDTH = 1100;
+
+    private static final int SECURITY_QUESTION_WIN_HEIGHT = 300;
+
+    private static final int SECURITY_QUESTION_WIN_WIDTH = 900;
+
     @SpringBean
     private ConfigurationRestClient confRestClient;
 
@@ -106,6 +116,9 @@ public class Configuration extends BaseP
     private NotificationRestClient notificationRestClient;
 
     @SpringBean
+    private SecurityQuestionRestClient securityQuestionRestClient;
+
+    @SpringBean
     private WorkflowRestClient wfRestClient;
 
     @SpringBean
@@ -115,12 +128,14 @@ public class Configuration extends BaseP
 
     private final ModalWindow editNotificationWin;
 
-    private static final int NOTIFICATION_WIN_HEIGHT = 500;
+    private final ModalWindow createSecurityQuestionWin;
 
-    private static final int NOTIFICATION_WIN_WIDTH = 1100;
+    private final ModalWindow editSecurityQuestionWin;
 
     private WebMarkupContainer notificationContainer;
 
+    private WebMarkupContainer securityQuestionContainer;
+
     private int notificationPaginatorRows;
 
     public Configuration() {
@@ -136,6 +151,10 @@ public class Configuration extends BaseP
         add(editNotificationWin = new ModalWindow("editNotificationWin"));
         setupNotification();
 
+        add(createSecurityQuestionWin = new 
ModalWindow("createSecurityQuestionWin"));
+        add(editSecurityQuestionWin = new 
ModalWindow("editSecurityQuestionWin"));
+        setupSecurityQuestion();
+
         // Workflow definition stuff
         WebMarkupContainer noActivitiEnabledForUsers = new 
WebMarkupContainer("noActivitiEnabledForUsers");
         noActivitiEnabledForUsers.setOutputMarkupPlaceholderTag(true);
@@ -335,7 +354,6 @@ public class Configuration extends BaseP
 
                     @Override
                     public void onClick(final AjaxRequestTarget target) {
-
                         editNotificationWin.setPageCreator(new 
ModalWindow.PageCreator() {
 
                             private static final long serialVersionUID = 
-7834632442532690940L;
@@ -358,7 +376,7 @@ public class Configuration extends BaseP
                     @Override
                     public void onClick(final AjaxRequestTarget target) {
                         try {
-                            
notificationRestClient.deleteNotification(notificationTO.getId());
+                            
notificationRestClient.delete(notificationTO.getId());
                         } catch (SyncopeClientException e) {
                             LOG.error("While deleting a notification", e);
                             error(e.getMessage());
@@ -398,13 +416,12 @@ public class Configuration extends BaseP
         setWindowClosedCallback(createNotificationWin, notificationContainer);
         setWindowClosedCallback(editNotificationWin, notificationContainer);
 
-        AjaxLink createNotificationLink = new 
AjaxLink("createNotificationLink") {
+        AjaxLink<Void> createNotificationLink = new 
AjaxLink<Void>("createNotificationLink") {
 
             private static final long serialVersionUID = -7978723352517770644L;
 
             @Override
             public void onClick(final AjaxRequestTarget target) {
-
                 createNotificationWin.setPageCreator(new 
ModalWindow.PageCreator() {
 
                     private static final long serialVersionUID = 
-7834632442532690940L;
@@ -449,11 +466,131 @@ public class Configuration extends BaseP
         add(notificationPaginatorForm);
     }
 
+    private void setupSecurityQuestion() {
+        final List<IColumn<SecurityQuestionTO, String>> securityQuestionCols =
+                new ArrayList<IColumn<SecurityQuestionTO, String>>();
+        securityQuestionCols.add(new PropertyColumn<SecurityQuestionTO, 
String>(
+                new ResourceModel("id"), "id", "id"));
+        securityQuestionCols.add(new PropertyColumn<SecurityQuestionTO, 
String>(
+                new ResourceModel("content"), "content", "content"));
+
+        securityQuestionCols.add(new AbstractColumn<SecurityQuestionTO, 
String>(new ResourceModel("actions", "")) {
+
+            private static final long serialVersionUID = 2054811145491901166L;
+
+            @Override
+            public String getCssClass() {
+                return "action";
+            }
+
+            @Override
+            public void populateItem(final 
Item<ICellPopulator<SecurityQuestionTO>> cellItem, final String componentId,
+                    final IModel<SecurityQuestionTO> model) {
+
+                final SecurityQuestionTO securityQuestionTO = 
model.getObject();
+
+                final ActionLinksPanel panel = new 
ActionLinksPanel(componentId, model, getPageReference());
+
+                panel.add(new ActionLink() {
+
+                    private static final long serialVersionUID = 
-3722207913631435501L;
+
+                    @Override
+                    public void onClick(final AjaxRequestTarget target) {
+                        editSecurityQuestionWin.setPageCreator(new 
ModalWindow.PageCreator() {
+
+                            private static final long serialVersionUID = 
-7834632442532690940L;
+
+                            @Override
+                            public Page createPage() {
+                                return new 
SecurityQuestionModalPage(Configuration.this.getPageReference(),
+                                        editSecurityQuestionWin, 
securityQuestionTO, false);
+                            }
+                        });
+
+                        editSecurityQuestionWin.show(target);
+                    }
+                }, ActionLink.ActionType.EDIT, "SecurityQuestion");
+
+                panel.add(new ActionLink() {
+
+                    private static final long serialVersionUID = 
-3722207913631435501L;
+
+                    @Override
+                    public void onClick(final AjaxRequestTarget target) {
+                        try {
+                            
securityQuestionRestClient.delete(securityQuestionTO.getId());
+                        } catch (SyncopeClientException e) {
+                            LOG.error("While deleting a security question", e);
+                            error(e.getMessage());
+                            return;
+                        }
+
+                        info(getString(Constants.OPERATION_SUCCEEDED));
+                        feedbackPanel.refresh(target);
+                        target.add(securityQuestionContainer);
+                    }
+                }, ActionLink.ActionType.DELETE, "SecurityQuestion");
+
+                cellItem.add(panel);
+            }
+        });
+
+        final AjaxFallbackDefaultDataTable<SecurityQuestionTO, String> 
securityQuestionTable =
+                new AjaxFallbackDefaultDataTable<SecurityQuestionTO, 
String>("securityQuestionTable",
+                        securityQuestionCols, new SecurityQuestionProvider(), 
50);
+
+        securityQuestionContainer = new 
WebMarkupContainer("securityQuestionContainer");
+        securityQuestionContainer.add(securityQuestionTable);
+        securityQuestionContainer.setOutputMarkupId(true);
+
+        add(securityQuestionContainer);
+
+        createSecurityQuestionWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+        
createSecurityQuestionWin.setInitialHeight(SECURITY_QUESTION_WIN_HEIGHT);
+        createSecurityQuestionWin.setInitialWidth(SECURITY_QUESTION_WIN_WIDTH);
+        
createSecurityQuestionWin.setCookieName("create-security-question-modal");
+
+        editSecurityQuestionWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+        editSecurityQuestionWin.setInitialHeight(SECURITY_QUESTION_WIN_HEIGHT);
+        editSecurityQuestionWin.setInitialWidth(SECURITY_QUESTION_WIN_WIDTH);
+        editSecurityQuestionWin.setCookieName("edit-security-question-modal");
+
+        setWindowClosedCallback(createSecurityQuestionWin, 
securityQuestionContainer);
+        setWindowClosedCallback(editSecurityQuestionWin, 
securityQuestionContainer);
+
+        AjaxLink<Void> createSecurityQuestionLink = new 
AjaxLink<Void>("createSecurityQuestionLink") {
+
+            private static final long serialVersionUID = -7978723352517770644L;
+
+            @Override
+            public void onClick(final AjaxRequestTarget target) {
+
+                createSecurityQuestionWin.setPageCreator(new 
ModalWindow.PageCreator() {
+
+                    private static final long serialVersionUID = 
-7834632442532690940L;
+
+                    @Override
+                    public Page createPage() {
+                        return new 
SecurityQuestionModalPage(Configuration.this.getPageReference(),
+                                createSecurityQuestionWin, new 
SecurityQuestionTO(), true);
+                    }
+                });
+
+                createSecurityQuestionWin.show(target);
+            }
+        };
+
+        
MetaDataRoleAuthorizationStrategy.authorize(createSecurityQuestionLink, ENABLE, 
xmlRolesReader.
+                getAllAllowedRoles("SecurityQuestion", "create"));
+        add(createSecurityQuestionLink);
+    }
+
     private class NotificationProvider extends 
SortableDataProvider<NotificationTO, String> {
 
         private static final long serialVersionUID = -276043813563988590L;
 
-        private SortableDataProviderComparator<NotificationTO> comparator;
+        private final SortableDataProviderComparator<NotificationTO> 
comparator;
 
         public NotificationProvider() {
             //Default sorting
@@ -477,7 +614,6 @@ public class Configuration extends BaseP
 
         @Override
         public IModel<NotificationTO> model(final NotificationTO notification) 
{
-
             return new AbstractReadOnlyModel<NotificationTO>() {
 
                 private static final long serialVersionUID = 
774694801558497248L;
@@ -490,6 +626,46 @@ public class Configuration extends BaseP
         }
     }
 
+    private class SecurityQuestionProvider extends 
SortableDataProvider<SecurityQuestionTO, String> {
+
+        private static final long serialVersionUID = -1458398823626281188L;
+
+        private final SortableDataProviderComparator<SecurityQuestionTO> 
comparator;
+
+        public SecurityQuestionProvider() {
+            //Default sorting
+            setSort("id", SortOrder.ASCENDING);
+            comparator = new 
SortableDataProviderComparator<SecurityQuestionTO>(this);
+        }
+
+        @Override
+        public Iterator<SecurityQuestionTO> iterator(final long first, final 
long count) {
+            List<SecurityQuestionTO> list = securityQuestionRestClient.list();
+
+            Collections.sort(list, comparator);
+
+            return list.subList((int) first, (int) first + (int) 
count).iterator();
+        }
+
+        @Override
+        public long size() {
+            return securityQuestionRestClient.list().size();
+        }
+
+        @Override
+        public IModel<SecurityQuestionTO> model(final SecurityQuestionTO 
securityQuestionTO) {
+            return new AbstractReadOnlyModel<SecurityQuestionTO>() {
+
+                private static final long serialVersionUID = 
5079291243768775704L;
+
+                @Override
+                public SecurityQuestionTO getObject() {
+                    return securityQuestionTO;
+                }
+            };
+        }
+    }
+
     private class LoggerPropertyList extends PropertyListView<LoggerTO> {
 
         private static final long serialVersionUID = 5911412425994616111L;

Modified: 
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/EditUserModalPage.java
URL: 
http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/EditUserModalPage.java?rev=1626769&r1=1626768&r2=1626769&view=diff
==============================================================================
--- 
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/EditUserModalPage.java
 (original)
+++ 
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/EditUserModalPage.java
 Mon Sep 22 13:25:10 2014
@@ -27,11 +27,13 @@ import org.apache.syncope.console.common
 import org.apache.syncope.console.pages.panels.AccountInformationPanel;
 import org.apache.syncope.console.pages.panels.MembershipsPanel;
 import org.apache.syncope.console.pages.panels.ResourcesPanel;
+import org.apache.syncope.console.pages.panels.SecurityQuestionPanel;
 import org.apache.syncope.console.pages.panels.StatusPanel;
 import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import 
org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.model.ResourceModel;
@@ -68,11 +70,14 @@ public class EditUserModalPage extends U
 
             form.addOrReplace(new 
AccountInformationPanel("accountinformation", userTO));
 
-            form.addOrReplace(new 
ResourcesPanel.Builder("resources").attributableTO(userTO).statusPanel(
-                    statusPanel).build());
+            form.addOrReplace(new 
ResourcesPanel.Builder("resources").attributableTO(userTO).
+                    statusPanel(statusPanel).build());
 
             form.addOrReplace(new MembershipsPanel("memberships", userTO, 
false, statusPanel, getPageReference()));
         }
+
+        // Security question / answer
+        form.addOrReplace(new SecurityQuestionPanel("securityQuestion", 
userTO));
     }
 
     @SuppressWarnings("rawtypes")

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=1626769&r1=1626768&r2=1626769&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 
Mon Sep 22 13:25:10 2014
@@ -62,6 +62,10 @@ public class Login extends WebPage {
 
     private final static int SELF_REG_WIN_WIDTH = 800;
 
+    private final static int PWD_RESET_WIN_HEIGHT = 300;
+
+    private final static int PWD_RESET_WIN_WIDTH = 800;
+
     @SpringBean(name = "version")
     private String version;
 
@@ -74,13 +78,13 @@ public class Login extends WebPage {
     @SpringBean
     private UserSelfRestClient userSelfRestClient;
 
-    private Form<Void> form;
+    private final Form<Void> form;
 
-    private TextField<String> userIdField;
+    private final TextField<String> userIdField;
 
-    private TextField<String> passwordField;
+    private final TextField<String> passwordField;
 
-    private DropDownChoice<Locale> languageSelect;
+    private final DropDownChoice<Locale> languageSelect;
 
     private final NotificationPanel feedbackPanel;
 
@@ -132,12 +136,12 @@ public class Login extends WebPage {
         add(form);
 
         // Modal window for self registration
-        final ModalWindow editProfileModalWin = new 
ModalWindow("selfRegModal");
-        editProfileModalWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
-        editProfileModalWin.setInitialHeight(SELF_REG_WIN_HEIGHT);
-        editProfileModalWin.setInitialWidth(SELF_REG_WIN_WIDTH);
-        editProfileModalWin.setCookieName("self-reg-modal");
-        add(editProfileModalWin);
+        final ModalWindow selfRegModalWin = new ModalWindow("selfRegModal");
+        selfRegModalWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+        selfRegModalWin.setInitialHeight(SELF_REG_WIN_HEIGHT);
+        selfRegModalWin.setInitialWidth(SELF_REG_WIN_WIDTH);
+        selfRegModalWin.setCookieName("self-reg-modal");
+        add(selfRegModalWin);
 
         Fragment selfRegFrag;
         if (userSelfRestClient.isSelfRegistrationAllowed()) {
@@ -149,7 +153,7 @@ public class Login extends WebPage {
 
                 @Override
                 protected void onClickInternal(final AjaxRequestTarget target) 
{
-                    editProfileModalWin.setPageCreator(new 
ModalWindow.PageCreator() {
+                    selfRegModalWin.setPageCreator(new 
ModalWindow.PageCreator() {
 
                         private static final long serialVersionUID = 
-7834632442532690940L;
 
@@ -159,11 +163,11 @@ public class Login extends WebPage {
                             authenticate(anonymousUser, anonymousKey);
 
                             return new UserSelfModalPage(
-                                    Login.this.getPageReference(), 
editProfileModalWin, new UserTO());
+                                    Login.this.getPageReference(), 
selfRegModalWin, new UserTO());
                         }
                     });
 
-                    editProfileModalWin.setWindowClosedCallback(new 
ModalWindow.WindowClosedCallback() {
+                    selfRegModalWin.setWindowClosedCallback(new 
ModalWindow.WindowClosedCallback() {
 
                         private static final long serialVersionUID = 
251794406325329768L;
 
@@ -173,7 +177,7 @@ public class Login extends WebPage {
                         }
                     });
 
-                    editProfileModalWin.show(target);
+                    selfRegModalWin.show(target);
                 }
             };
             selfRegLink.add(new Label("linkTitle", 
getString("selfRegistration")));
@@ -185,6 +189,60 @@ public class Login extends WebPage {
             selfRegFrag = new Fragment("selfRegistration", 
"selfRegNotAllowed", this);
         }
         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);
+
+        Fragment pwdResetFrag;
+        if (userSelfRestClient.isPasswordResetAllowed()) {
+            pwdResetFrag = new Fragment("passwordReset", "pwdResetAllowed", 
this);
+
+            final AjaxLink<Void> pwdResetLink = new 
ClearIndicatingAjaxLink<Void>("link", getPageReference()) {
+
+                private static final long serialVersionUID = 
-6957616042924610290L;
+
+                @Override
+                protected void onClickInternal(final AjaxRequestTarget target) 
{
+                    pwdResetModalWin.setPageCreator(new 
ModalWindow.PageCreator() {
+
+                        private static final long serialVersionUID = 
-7834632442532690940L;
+
+                        @Override
+                        public Page createPage() {
+                            // anonymous authentication needed for password 
reset request
+                            authenticate(anonymousUser, anonymousKey);
+
+                            return null;
+                        }
+                    });
+
+                    pwdResetModalWin.setWindowClosedCallback(new 
ModalWindow.WindowClosedCallback() {
+
+                        private static final long serialVersionUID = 
8804221891699487139L;
+
+                        @Override
+                        public void onClose(final AjaxRequestTarget target) {
+                            SyncopeSession.get().invalidate();
+                        }
+                    });
+
+                    pwdResetModalWin.show(target);
+                }
+            };
+            pwdResetLink.add(new Label("linkTitle", 
getString("passwordReset")));
+
+            Panel panel = new LinkPanel("passwordReset", new 
ResourceModel("passwordReset"));
+            panel.add(pwdResetLink);
+            pwdResetFrag.add(panel);
+        } else {
+            pwdResetFrag = new Fragment("passwordReset", "pwdResetNotAllowed", 
this);
+        }
+        add(pwdResetFrag);
     }
 
     private void authenticate(final String username, final String password) {

Modified: 
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java
URL: 
http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java?rev=1626769&r1=1626768&r2=1626769&view=diff
==============================================================================
--- 
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java
 (original)
+++ 
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java
 Mon Sep 22 13:25:10 2014
@@ -32,6 +32,7 @@ import org.apache.syncope.console.common
 import org.apache.syncope.console.pages.panels.LoggerCategoryPanel;
 import org.apache.syncope.console.pages.panels.RoleSearchPanel;
 import org.apache.syncope.console.pages.panels.UserSearchPanel;
+import org.apache.syncope.console.rest.ConfigurationRestClient;
 import org.apache.syncope.console.rest.LoggerRestClient;
 import org.apache.syncope.console.rest.NotificationRestClient;
 import org.apache.syncope.console.wicket.markup.html.form.AjaxCheckBoxPanel;
@@ -62,6 +63,9 @@ class NotificationModalPage extends Base
     private NotificationRestClient restClient;
 
     @SpringBean
+    private ConfigurationRestClient confRestClient;
+
+    @SpringBean
     private LoggerRestClient loggerRestClient;
 
     public NotificationModalPage(final PageReference pageRef, final 
ModalWindow window,
@@ -84,7 +88,7 @@ class NotificationModalPage extends Base
         final AjaxDropDownChoicePanel<String> template = new 
AjaxDropDownChoicePanel<String>(
                 "template", getString("template"),
                 new PropertyModel<String>(notificationTO, "template"));
-        template.setChoices(restClient.getMailTemplates());
+        template.setChoices(confRestClient.getMailTemplates());
         template.addRequiredLabel();
         form.add(template);
 
@@ -289,6 +293,7 @@ class NotificationModalPage extends Base
                 if (!selfAsRecipient.getModelObject()
                         && !checkRecipients.getModelObject()
                         && !checkStaticRecipients.getModelObject()) {
+
                     
checkRecipients.getField().setDefaultModelObject(Boolean.TRUE);
                     target.add(checkRecipients);
                     recipients.setEnabled(checkRecipients.getModelObject());
@@ -307,6 +312,7 @@ class NotificationModalPage extends Base
                 if (!checkRecipients.getModelObject()
                         && !selfAsRecipient.getModelObject()
                         && !checkStaticRecipients.getModelObject()) {
+
                     
checkStaticRecipients.getField().setDefaultModelObject(Boolean.TRUE);
                     target.add(checkStaticRecipients);
                     staticRecipients.setEnabled(Boolean.TRUE);
@@ -359,9 +365,9 @@ class NotificationModalPage extends Base
 
                 try {
                     if (createFlag) {
-                        restClient.createNotification(notificationTO);
+                        restClient.create(notificationTO);
                     } else {
-                        restClient.updateNotification(notificationTO);
+                        restClient.update(notificationTO);
                     }
                     info(getString(Constants.OPERATION_SUCCEEDED));
 

Modified: 
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/UserModalPage.java
URL: 
http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/UserModalPage.java?rev=1626769&r1=1626768&r2=1626769&view=diff
==============================================================================
--- 
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/UserModalPage.java
 (original)
+++ 
syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/UserModalPage.java
 Mon Sep 22 13:25:10 2014
@@ -117,6 +117,8 @@ public abstract class UserModalPage exte
         form.add(new Label("statuspanel", ""));
 
         form.add(new Label("pwdChangeInfo", ""));
+        
+        form.add(new Label("securityQuestion", ""));
 
         form.add(new Label("accountinformation", ""));
         //--------------------------------
@@ -154,7 +156,7 @@ public abstract class UserModalPage exte
         //--------------------------------
         // Resources panel
         //--------------------------------
-        form.add(new 
ResourcesPanel.Builder("resources").attributableTO(userTO).statusPanel(null).build());
+        form.add(new 
ResourcesPanel.Builder("resources").attributableTO(userTO).build());
         //--------------------------------
 
         //--------------------------------

Modified: 
syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ConfigurationRestClient.java
URL: 
http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ConfigurationRestClient.java?rev=1626769&r1=1626768&r2=1626769&view=diff
==============================================================================
--- 
syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ConfigurationRestClient.java
 (original)
+++ 
syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ConfigurationRestClient.java
 Mon Sep 22 13:25:10 2014
@@ -18,10 +18,14 @@
  */
 package org.apache.syncope.console.rest;
 
+import java.util.ArrayList;
+import java.util.List;
 import javax.ws.rs.core.Response;
 import org.apache.syncope.common.services.ConfigurationService;
 import org.apache.syncope.common.to.AttributeTO;
 import org.apache.syncope.common.to.ConfTO;
+import org.apache.syncope.common.util.CollectionWrapper;
+import org.apache.syncope.common.wrap.MailTemplate;
 import org.springframework.stereotype.Component;
 
 @Component
@@ -45,6 +49,11 @@ public class ConfigurationRestClient ext
         getService(ConfigurationService.class).delete(key);
     }
 
+    public List<String> getMailTemplates() {
+        return CollectionWrapper.unwrap(
+                new 
ArrayList<MailTemplate>(getService(ConfigurationService.class).getMailTemplates()));
+    }
+
     public Response dbExport() {
         return getService(ConfigurationService.class).export();
     }

Modified: 
syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/NotificationRestClient.java
URL: 
http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/NotificationRestClient.java?rev=1626769&r1=1626768&r2=1626769&view=diff
==============================================================================
--- 
syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/NotificationRestClient.java
 (original)
+++ 
syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/NotificationRestClient.java
 Mon Sep 22 13:25:10 2014
@@ -18,14 +18,10 @@
  */
 package org.apache.syncope.console.rest;
 
-import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.syncope.common.services.ConfigurationService;
 import org.apache.syncope.common.services.NotificationService;
-import org.apache.syncope.common.wrap.MailTemplate;
 import org.apache.syncope.common.to.NotificationTO;
-import org.apache.syncope.common.util.CollectionWrapper;
 import org.springframework.stereotype.Component;
 
 @Component
@@ -37,24 +33,19 @@ public class NotificationRestClient exte
         return getService(NotificationService.class).list();
     }
 
-    public NotificationTO readNotification(final Long id) {
+    public NotificationTO read(final Long id) {
         return getService(NotificationService.class).read(id);
     }
 
-    public void createNotification(final NotificationTO notificationTO) {
+    public void create(final NotificationTO notificationTO) {
         getService(NotificationService.class).create(notificationTO);
     }
 
-    public void updateNotification(final NotificationTO notificationTO) {
+    public void update(final NotificationTO notificationTO) {
         getService(NotificationService.class).update(notificationTO.getId(), 
notificationTO);
     }
 
-    public void deleteNotification(final Long id) {
+    public void delete(final Long id) {
         getService(NotificationService.class).delete(id);
     }
-
-    public List<String> getMailTemplates() {
-        return CollectionWrapper.unwrap(
-                new 
ArrayList<MailTemplate>(getService(ConfigurationService.class).getMailTemplates()));
-    }
 }

Modified: 
syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/UserSelfRestClient.java
URL: 
http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/UserSelfRestClient.java?rev=1626769&r1=1626768&r2=1626769&view=diff
==============================================================================
--- 
syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/UserSelfRestClient.java
 (original)
+++ 
syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/UserSelfRestClient.java
 Mon Sep 22 13:25:10 2014
@@ -58,4 +58,26 @@ public class UserSelfRestClient extends 
     public void delete() {
         getService(UserSelfService.class).delete();
     }
+
+    public boolean isPasswordResetAllowed() {
+        Boolean result = null;
+        try {
+            result = SyncopeSession.get().isPasswordResetAllowed();
+        } catch (SyncopeClientException e) {
+            LOG.error("While seeking if password reset is allowed", e);
+        }
+
+        return result == null
+                ? false
+                : result.booleanValue();
+    }
+
+    public void requestPasswordReset(final String username, final String 
securityAnswer) {
+        getService(UserSelfService.class).requestPasswordReset(username, 
securityAnswer);
+    }
+
+    public void confirmPasswordReset(final String token, final String 
password) {
+        getService(UserSelfService.class).confirmPasswordReset(token, 
password);
+    }
+
 }

Modified: syncope/trunk/console/src/main/resources/authorizations.xml
URL: 
http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/authorizations.xml?rev=1626769&r1=1626768&r2=1626769&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/authorizations.xml (original)
+++ syncope/trunk/console/src/main/resources/authorizations.xml Mon Sep 22 
13:25:10 2014
@@ -260,6 +260,28 @@ under the License.
     </action>
   </page>
 
+  <page id="SecurityQuestion">
+    <action id="list">
+      <entitlement>SECURITY_QUESTION_LIST</entitlement>
+    </action>
+
+    <action id="create">
+      <entitlement>SECURITY_QUESTION_CREATE</entitlement>
+    </action>
+
+    <action id="read">
+      <entitlement>SECURITY_QUESTION_READ</entitlement>
+    </action>
+
+    <action id="update">
+      <entitlement>SECURITY_QUESTION_UPDATE</entitlement>
+    </action>
+
+    <action id="delete">
+      <entitlement>SECURITY_QUESTION_DELETE</entitlement>
+    </action>
+  </page>
+  
   <page id="Tasks">
     <action id="list">
       <entitlement>TASK_LIST</entitlement>

Modified: 
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Configuration.html
URL: 
http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Configuration.html?rev=1626769&r1=1626768&r2=1626769&view=diff
==============================================================================
--- 
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Configuration.html
 (original)
+++ 
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Configuration.html
 Mon Sep 22 13:25:10 2014
@@ -35,6 +35,7 @@ under the License.
         </li>
         <li><a href="#policies"><span><wicket:message 
key="policies"/></span></a></li>
         <li><a href="#notifications"><span><wicket:message 
key="notifications"/></span></a></li>
+        <li><a href="#securityQuestions"><span><wicket:message 
key="securityQuestions"/></span></a></li>
         <li><a href="#workflow"><span><wicket:message 
key="workflow"/></span></a></li>
         <li><a href="#logs"><span><wicket:message key="logs"/></span></a></li>
       </ul>
@@ -91,6 +92,22 @@ under the License.
           <wicket:message key="create"/>
         </a>
       </div>
+      <div id="securityQuestions">
+        <div id="users-contain" class="ui-widget" style="width:inherit">
+          <span wicket:id="securityQuestionContainer">
+            <table class="ui-widget ui-widget-content table-hover"
+                   wicket:id="securityQuestionTable"/>
+          </span>
+        </div>
+
+        <div wicket:id="createSecurityQuestionWin">[Show modal window for 
creating security questions]</div>
+        <div wicket:id="editSecurityQuestionWin">[Show modal window for 
editing security questions]</div>
+
+        <a class="ui-button ui-widget ui-state-default ui-corner-all 
ui-button-text-only"
+           wicket:id="createSecurityQuestionLink">
+          <wicket:message key="create"/>
+        </a>
+      </div>
       <div id="workflow">
         <div id="users-contain" class="ui-widget" style="width:inherit">
           <span wicket:id="noActivitiEnabledForUsers"><i><wicket:message 
key="noActivitiEnabledForUsers"/></i></span>

Modified: 
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Configuration.properties
URL: 
http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Configuration.properties?rev=1626769&r1=1626768&r2=1626769&view=diff
==============================================================================
--- 
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Configuration.properties
 (original)
+++ 
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Configuration.properties
 Mon Sep 22 13:25:10 2014
@@ -36,3 +36,5 @@ policies=Policies
 logs=Logs
 active=Enabled
 apply=Save
+securityQuestions=Security Questions
+content=Text

Modified: 
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Configuration_it.properties
URL: 
http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Configuration_it.properties?rev=1626769&r1=1626768&r2=1626769&view=diff
==============================================================================
--- 
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Configuration_it.properties
 (original)
+++ 
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Configuration_it.properties
 Mon Sep 22 13:25:10 2014
@@ -36,3 +36,5 @@ policies=Politiche
 logs=Logs
 active=Abilitata
 apply=Salva
+securityQuestions=Domande di sicurezza
+content=Testo

Modified: 
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Configuration_pt_BR.properties
URL: 
http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Configuration_pt_BR.properties?rev=1626769&r1=1626768&r2=1626769&view=diff
==============================================================================
--- 
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Configuration_pt_BR.properties
 (original)
+++ 
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Configuration_pt_BR.properties
 Mon Sep 22 13:25:10 2014
@@ -36,3 +36,5 @@ policies=Pol\u00edticas
 logs=Logs
 active=Ativada
 apply=Salvar
+securityQuestions=Quest\u00f5es de seguran\u00e7a
+content=Texto

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=1626769&r1=1626768&r2=1626769&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
 Mon Sep 22 13:25:10 2014
@@ -65,7 +65,10 @@ under the License.
         <input type="submit" wicket:id="submit"/>
       </form>
 
-      <span style="display: inline-table; margin-bottom: 10px;" 
wicket:id="selfRegistration"/>
+      <div style="display: inline-table; margin: 10px; width:380px;">
+        <div style="display: inline-table-cell; text-align: left; float: 
left;" wicket:id="selfRegistration"/>
+        <div style="display: inline-table-cell; text-align: left; float: 
right;" wicket:id="passwordReset"/>
+      </div>
 
       <wicket:fragment wicket:id="selfRegNotAllowed"/>
       <wicket:fragment wicket:id="selfRegAllowed">
@@ -73,6 +76,13 @@ under the License.
       </wicket:fragment>
 
       <div wicket:id="selfRegModal"></div>
+
+      <wicket:fragment wicket:id="pwdResetNotAllowed"/>
+      <wicket:fragment wicket:id="pwdResetAllowed">
+        <span wicket:id="passwordReset"/>
+      </wicket:fragment>
+
+      <div wicket:id="pwdResetModal"></div>
     </div>
   </body>
 </html>

Modified: 
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Login.properties
URL: 
http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Login.properties?rev=1626769&r1=1626768&r2=1626769&view=diff
==============================================================================
--- 
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Login.properties
 (original)
+++ 
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Login.properties
 Mon Sep 22 13:25:10 2014
@@ -19,3 +19,4 @@ password=Password
 submit=Login
 login-error=Wrong user id and/or password
 selfRegistration=Self registration
+passwordReset=Password reset

Modified: 
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Login_it.properties
URL: 
http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Login_it.properties?rev=1626769&r1=1626768&r2=1626769&view=diff
==============================================================================
--- 
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Login_it.properties
 (original)
+++ 
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Login_it.properties
 Mon Sep 22 13:25:10 2014
@@ -19,3 +19,4 @@ password=Password
 submit=Login
 login-error=Id utente e/o password errate
 selfRegistration=Registrati
+passwordReset=Password smarrita

Modified: 
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Login_pt_BR.properties
URL: 
http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Login_pt_BR.properties?rev=1626769&r1=1626768&r2=1626769&view=diff
==============================================================================
--- 
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Login_pt_BR.properties
 (original)
+++ 
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/Login_pt_BR.properties
 Mon Sep 22 13:25:10 2014
@@ -14,8 +14,9 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-userId=Usu\u00E1rio
+userId=Usu\u00e1rio
 password=Senha
 submit=Login
-login-error=Usu\u00E1rio ou senha incorretos
+login-error=Usu\u00e1rio ou senha incorretos
 selfRegistration=Registrar-se
+passwordReset=Redefini\u00e7\u00e3o de senha

Modified: 
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/UserModalPage.html
URL: 
http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/UserModalPage.html?rev=1626769&r1=1626768&r2=1626769&view=diff
==============================================================================
--- 
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/UserModalPage.html
 (original)
+++ 
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/UserModalPage.html
 Mon Sep 22 13:25:10 2014
@@ -53,7 +53,8 @@ under the License.
               </wicket:fragment>
               <wicket:fragment wicket:id="emptyFragment">
               </wicket:fragment>
-              <div wicket:id="pwdChangeInfo" style="margin-top: 
25px;">[pwdChangeInfo]</div>
+              <div wicket:id="securityQuestion">[Security Question]</div>
+              <div wicket:id="pwdChangeInfo" style="margin-top: 
10px;">[pwdChangeInfo]</div>
               <span wicket:id="statuspanel">[Status Panel]</span>
               <span wicket:id="accountinformation">[Account Information]</span>
             </div>

Modified: 
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/AccountInformationPanel.html
URL: 
http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/AccountInformationPanel.html?rev=1626769&r1=1626768&r2=1626769&view=diff
==============================================================================
--- 
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/AccountInformationPanel.html
 (original)
+++ 
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/AccountInformationPanel.html
 Mon Sep 22 13:25:10 2014
@@ -16,7 +16,7 @@ KIND, either express or implied.  See th
 specific language governing permissions and limitations
 under the License.
 -->
-<html>
+<html xmlns="http://www.w3.org/1999/xhtml"; 
xmlns:wicket="http://wicket.apache.org";>
   <wicket:extend>
 
     <div class="infoleft">
@@ -24,7 +24,7 @@ under the License.
         <wicket:message key="lastLoginDate"/>:
       </div>
       <div>
-        <span wicket:id="lastLoginDate" />
+        <span wicket:id="lastLoginDate"/>
       </div>
     </div>
 
@@ -33,7 +33,7 @@ under the License.
         <wicket:message key="failedLogins"/>:
       </div>
       <div>
-        <span wicket:id="failedLogins" />
+        <span wicket:id="failedLogins"/>
       </div>
     </div>
 
@@ -42,7 +42,7 @@ under the License.
         <wicket:message key="changePwdDate"/>:
       </div>
       <div>
-        <span wicket:id="changePwdDate" />
+        <span wicket:id="changePwdDate"/>
       </div>
     </div>
 
@@ -51,7 +51,7 @@ under the License.
         <wicket:message key="tokenExpireTime"/>
       </div>
       <div>
-        <span wicket:id="tokenExpireTime" />
+        <span wicket:id="tokenExpireTime"/>
       </div>
     </div>
 
@@ -59,8 +59,8 @@ under the License.
       <div class="infolabel">
         <wicket:message key="token"/>:
       </div>
-      <div>
-        <span wicket:id="token" />
+      <div style="word-wrap: break-word; width: 550px; margin-left: 155px;">
+        <span wicket:id="token"/>
       </div>
     </div>
   </wicket:extend>

Modified: 
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/UserDetailsPanel.html
URL: 
http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/UserDetailsPanel.html?rev=1626769&r1=1626768&r2=1626769&view=diff
==============================================================================
--- 
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/UserDetailsPanel.html
 (original)
+++ 
syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/panels/UserDetailsPanel.html
 Mon Sep 22 13:25:10 2014
@@ -24,7 +24,7 @@ under the License.
           <wicket:message key="username"/>
         </div>
         <div class="tablecolumn_field medium_dynamicsize">
-          <span wicket:id="username" />
+          <span wicket:id="username"/>
           <a class="tooltips" wicket:id="usernameQuestionMarkJexlHelp" 
href="#" alt="Click to help" title="Click to help"><img src="img/help.png"/>
             <span wicket:id="usernameJexlHelp" class="tooltips">
               <wicket:message key="jexl_info"/>
@@ -43,7 +43,7 @@ under the License.
           <wicket:message key="password"/>
         </div>
         <div class="tablecolumn_field medium_dynamicsize">
-          <span wicket:id="password" />
+          <span wicket:id="password"/>
           <span wicket:id="mandatory_pwd"></span>
           <a class="tooltips" wicket:id="pwdQuestionMarkJexlHelp" href="#" 
alt="Click to help" title="Click to help">
             <img src="img/help.png"/>
@@ -63,7 +63,7 @@ under the License.
           <span wicket:id="confirmPasswordLabel"/>
         </div>
         <div class="tablecolumn_field medium_dynamicsize">
-          <span wicket:id="confirmPassword" />
+          <span wicket:id="confirmPassword"/>
         </div>
       </div>
     </div>

Modified: 
syncope/trunk/core/src/main/java/org/apache/syncope/core/services/UserSelfServiceImpl.java
URL: 
http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/services/UserSelfServiceImpl.java?rev=1626769&r1=1626768&r2=1626769&view=diff
==============================================================================
--- 
syncope/trunk/core/src/main/java/org/apache/syncope/core/services/UserSelfServiceImpl.java
 (original)
+++ 
syncope/trunk/core/src/main/java/org/apache/syncope/core/services/UserSelfServiceImpl.java
 Mon Sep 22 13:25:10 2014
@@ -40,7 +40,7 @@ public class UserSelfServiceImpl extends
     public Response getOptions() {
         return Response.ok().header(HttpHeaders.ALLOW, OPTIONS_ALLOW).
                 header(RESTHeaders.SELFREGISTRATION_ALLOWED, 
controller.isSelfRegistrationAllowed()).
-                header(RESTHeaders.PASSWORDRESET_ALLOWED, 
controller.isSelfRegistrationAllowed()).
+                header(RESTHeaders.PASSWORDRESET_ALLOWED, 
controller.isPasswordResetAllowed()).
                 build();
     }
 


Reply via email to