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 2020/02/04 08:06:23 UTC

[syncope] 02/02: [SYNCOPE-957] Better status management and display

This is an automated email from the ASF dual-hosted git repository.

ilgrosso pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/syncope.git

commit aacd9f7b615ec1fc578dec1becddbcd874e80a4b
Author: Francesco Chicchiriccò <il...@apache.org>
AuthorDate: Tue Feb 4 08:07:22 2020 +0100

    [SYNCOPE-957] Better status management and display
---
 .../client/console/commons/IdMStatusProvider.java  |  10 ++
 .../console/panels/LinkedAccountModalPanel.java    | 150 +++++++++++++--------
 .../console/status/LinkedAccountStatusPanel.java   |  66 +++++++++
 .../client/console/status/ReconStatusUtils.java    |  14 ++
 .../wizards/any/LinkedAccountWizardBuilder.java    |   1 -
 .../console/panels/LinkedAccountModalPanel.html    |   0
 .../panels/LinkedAccountModalPanel.properties      |   1 +
 .../LinkedAccountModalPanel_fr_CA.properties       |   5 +-
 .../panels/LinkedAccountModalPanel_it.properties   |   1 +
 .../panels/LinkedAccountModalPanel_ja.properties   |   1 +
 .../LinkedAccountModalPanel_pt_BR.properties       |   1 +
 .../panels/LinkedAccountModalPanel_ru.properties   |   1 +
 .../console/commons/IdRepoStatusProvider.java      |   9 ++
 .../client/console/commons/StatusProvider.java     |   5 +
 .../client/console/panels/ListViewPanel.java       |   4 +-
 .../syncope/common/lib/to/LinkedAccountTO.java     |   1 +
 16 files changed, 211 insertions(+), 59 deletions(-)

diff --git a/client/idm/console/src/main/java/org/apache/syncope/client/console/commons/IdMStatusProvider.java b/client/idm/console/src/main/java/org/apache/syncope/client/console/commons/IdMStatusProvider.java
index 4c778dd..7e2d7b0 100644
--- a/client/idm/console/src/main/java/org/apache/syncope/client/console/commons/IdMStatusProvider.java
+++ b/client/idm/console/src/main/java/org/apache/syncope/client/console/commons/IdMStatusProvider.java
@@ -21,7 +21,9 @@ package org.apache.syncope.client.console.commons;
 import java.io.Serializable;
 import java.util.Collection;
 import java.util.List;
+import java.util.Optional;
 import java.util.stream.Collectors;
+import org.apache.commons.lang3.tuple.Pair;
 import org.apache.commons.lang3.tuple.Triple;
 import org.apache.syncope.client.console.panels.ListViewPanel;
 import org.apache.syncope.client.ui.commons.status.ConnObjectWrapper;
@@ -36,6 +38,14 @@ public class IdMStatusProvider implements StatusProvider {
     private static final long serialVersionUID = 1875374599950896631L;
 
     @Override
+    public Optional<Pair<ConnObjectTO, ConnObjectTO>> get(
+            final String anyTypeKey, final String connObjectKeyValue, final String resource) {
+
+        return ReconStatusUtils.getReconStatus(anyTypeKey, connObjectKeyValue, resource).
+                map(status -> Pair.of(status.getOnSyncope(), status.getOnResource()));
+    }
+
+    @Override
     public List<Triple<ConnObjectTO, ConnObjectWrapper, String>> get(
             final AnyTO any, final Collection<String> resources) {
 
diff --git a/client/idm/console/src/main/java/org/apache/syncope/client/console/panels/LinkedAccountModalPanel.java b/client/idm/console/src/main/java/org/apache/syncope/client/console/panels/LinkedAccountModalPanel.java
index f1f1b90..7d22bcf 100644
--- a/client/idm/console/src/main/java/org/apache/syncope/client/console/panels/LinkedAccountModalPanel.java
+++ b/client/idm/console/src/main/java/org/apache/syncope/client/console/panels/LinkedAccountModalPanel.java
@@ -19,13 +19,13 @@
 package org.apache.syncope.client.console.panels;
 
 import java.util.ArrayList;
-import java.util.Collections;
+import java.util.Comparator;
 import java.util.List;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.syncope.client.console.SyncopeConsoleSession;
 import org.apache.syncope.client.console.pages.BasePage;
-import org.apache.syncope.client.console.rest.AnyTypeRestClient;
 import org.apache.syncope.client.console.rest.UserRestClient;
-import org.apache.syncope.client.console.status.ReconStatusPanel;
+import org.apache.syncope.client.console.status.LinkedAccountStatusPanel;
 import org.apache.syncope.client.console.status.ReconTaskPanel;
 import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
 import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
@@ -44,10 +44,13 @@ import org.apache.syncope.common.lib.to.PushTaskTO;
 import org.apache.syncope.common.lib.to.UserTO;
 import org.apache.syncope.common.lib.types.IdRepoEntitlement;
 import org.apache.syncope.common.lib.types.PatchOperation;
+import org.apache.wicket.AttributeModifier;
+import org.apache.wicket.Component;
 import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.AjaxLink;
 import org.apache.wicket.event.Broadcast;
+import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.panel.Panel;
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.Model;
@@ -92,21 +95,19 @@ public class LinkedAccountModalPanel extends Panel implements ModalPanel {
 
         wizard = new LinkedAccountWizardBuilder(model, pageRef);
 
-        final ListViewPanel.Builder<LinkedAccountTO> builder = new ListViewPanel.Builder<LinkedAccountTO>(
+        ListViewPanel.Builder<LinkedAccountTO> builder = new ListViewPanel.Builder<LinkedAccountTO>(
                 LinkedAccountTO.class, pageRef) {
 
             private static final long serialVersionUID = -5322423525438435153L;
 
             @Override
-            protected LinkedAccountTO getActualItem(
-                    final LinkedAccountTO item, final List<LinkedAccountTO> list) {
-
+            protected LinkedAccountTO getActualItem(final LinkedAccountTO item, final List<LinkedAccountTO> list) {
                 return item == null
                         ? null
                         : list.stream().filter(
                                 in -> ((item.getKey() == null && in.getKey() == null)
-                                || (in.getKey() != null && in.getKey().
-                                equals(item.getKey())))).findAny().orElse(null);
+                                || (in.getKey() != null && in.getKey().equals(item.getKey())))).
+                                findAny().orElse(null);
             }
 
             @Override
@@ -137,6 +138,19 @@ public class LinkedAccountModalPanel extends Panel implements ModalPanel {
             }
 
             @Override
+            protected Component getValueComponent(final String key, final LinkedAccountTO bean) {
+                if ("suspended".equalsIgnoreCase(key)) {
+                    Label label = new Label("field", StringUtils.EMPTY);
+                    if (bean.isSuspended()) {
+                        label.add(new AttributeModifier("class", "glyphicon glyphicon-ok"));
+                        label.add(new AttributeModifier("style", "display: table-cell; text-align: center;"));
+                    }
+                    return label;
+                }
+                return super.getValueComponent(key, bean);
+            }
+
+            @Override
             protected ActionLinksTogglePanel<LinkedAccountTO> getTogglePanel() {
                 return actionTogglePanel;
             }
@@ -156,11 +170,10 @@ public class LinkedAccountModalPanel extends Panel implements ModalPanel {
 
             @Override
             public void onClick(final AjaxRequestTarget target, final LinkedAccountTO linkedAccountTO) {
-                mlp.next(linkedAccountTO.getResource(),
-                        new ReconStatusPanel(
-                                linkedAccountTO.getResource(),
-                                model.getObject().getType(),
-                                model.getObject().getKey()),
+                mlp.next(linkedAccountTO.getResource(), new LinkedAccountStatusPanel(
+                        linkedAccountTO.getResource(),
+                        model.getObject().getType(),
+                        linkedAccountTO.getConnObjectKeyValue()),
                         target);
                 target.add(mlp);
 
@@ -181,11 +194,9 @@ public class LinkedAccountModalPanel extends Panel implements ModalPanel {
                         send(LinkedAccountModalPanel.this, Broadcast.DEPTH,
                                 new AjaxWizard.NewItemActionEvent<>(linkedAccountTO, 1, target).
                                         setResourceModel(new StringResourceModel("inner.edit.linkedAccount",
-                                                LinkedAccountModalPanel.this,
-                                                Model.of(linkedAccountTO))));
-
+                                                LinkedAccountModalPanel.this, Model.of(linkedAccountTO))));
                     } catch (SyncopeClientException e) {
-                        LOG.error("While contacting linked account", e);
+                        LOG.error("While attempting to create new linked account", e);
                         SyncopeConsoleSession.get().onException(e);
                         ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
                     }
@@ -193,7 +204,37 @@ public class LinkedAccountModalPanel extends Panel implements ModalPanel {
                     send(LinkedAccountModalPanel.this, Broadcast.BREADTH,
                             new ActionLinksTogglePanel.ActionLinkToggleCloseEventPayload(target));
                 }
-            }, ActionLink.ActionType.EDIT, IdRepoEntitlement.USER_READ);
+            }, ActionLink.ActionType.EDIT, IdRepoEntitlement.USER_UPDATE);
+
+            builder.addAction(new ActionLink<LinkedAccountTO>() {
+
+                private static final long serialVersionUID = 2555747430358755813L;
+
+                @Override
+                public void onClick(final AjaxRequestTarget target, final LinkedAccountTO linkedAccountTO) {
+                    try {
+                        linkedAccountTO.setSuspended(!linkedAccountTO.isSuspended());
+                        LinkedAccountUR linkedAccountUR = new LinkedAccountUR.Builder().
+                                operation(PatchOperation.ADD_REPLACE).
+                                linkedAccountTO(linkedAccountTO).build();
+
+                        UserUR req = new UserUR();
+                        req.setKey(model.getObject().getKey());
+                        req.getLinkedAccounts().add(linkedAccountUR);
+                        model.setObject(userRestClient.update(model.getObject().getETagValue(), req).getEntity());
+
+                        SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
+                    } catch (SyncopeClientException e) {
+                        LOG.error("While toggling status of linked account", e);
+                        SyncopeConsoleSession.get().onException(e);
+                        ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
+                    }
+
+                    checkAddButton();
+                    ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
+                    send(LinkedAccountModalPanel.this, Broadcast.DEPTH, new ListViewPanel.ListViewReload<>(target));
+                }
+            }, ActionLink.ActionType.ENABLE, IdRepoEntitlement.USER_UPDATE);
         }
 
         builder.addAction(new ActionLink<LinkedAccountTO>() {
@@ -219,31 +260,34 @@ public class LinkedAccountModalPanel extends Panel implements ModalPanel {
                 send(LinkedAccountModalPanel.this, Broadcast.BREADTH,
                         new ActionLinksTogglePanel.ActionLinkToggleCloseEventPayload(target));
             }
-        }, ActionLink.ActionType.RECONCILIATION_PUSH, IdRepoEntitlement.USER_READ).
-                addAction(new ActionLink<LinkedAccountTO>() {
-
-                    private static final long serialVersionUID = 2555747430358755813L;
-
-                    @Override
-                    public void onClick(final AjaxRequestTarget target, final LinkedAccountTO linkedAccountTO) {
-                        mlp.next("PULL " + linkedAccountTO.getResource(),
-                                new ReconTaskPanel(
-                                        linkedAccountTO.getResource(),
-                                        new PullTaskTO(),
-                                        model.getObject().getType(),
-                                        null,
-                                        linkedAccountTO.getConnObjectKeyValue(),
-                                        true,
-                                        mlp,
-                                        pageRef),
-                                target);
-                        target.add(mlp);
+        }, ActionLink.ActionType.RECONCILIATION_PUSH,
+                String.format("%s,%s", IdRepoEntitlement.USER_READ, IdRepoEntitlement.TASK_EXECUTE));
 
-                        ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
-                        send(LinkedAccountModalPanel.this, Broadcast.BREADTH,
-                                new ActionLinksTogglePanel.ActionLinkToggleCloseEventPayload(target));
-                    }
-                }, ActionLink.ActionType.RECONCILIATION_PULL, IdRepoEntitlement.USER_READ);
+        builder.addAction(new ActionLink<LinkedAccountTO>() {
+
+            private static final long serialVersionUID = 2555747430358755813L;
+
+            @Override
+            public void onClick(final AjaxRequestTarget target, final LinkedAccountTO linkedAccountTO) {
+                mlp.next("PULL " + linkedAccountTO.getResource(),
+                        new ReconTaskPanel(
+                                linkedAccountTO.getResource(),
+                                new PullTaskTO(),
+                                model.getObject().getType(),
+                                null,
+                                linkedAccountTO.getConnObjectKeyValue(),
+                                true,
+                                mlp,
+                                pageRef),
+                        target);
+                target.add(mlp);
+
+                ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
+                send(LinkedAccountModalPanel.this, Broadcast.BREADTH,
+                        new ActionLinksTogglePanel.ActionLinkToggleCloseEventPayload(target));
+            }
+        }, ActionLink.ActionType.RECONCILIATION_PULL,
+                String.format("%s,%s", IdRepoEntitlement.USER_READ, IdRepoEntitlement.TASK_EXECUTE));
 
         if (!recounciliationOnly) {
             builder.addAction(new ActionLink<LinkedAccountTO>() {
@@ -253,14 +297,14 @@ public class LinkedAccountModalPanel extends Panel implements ModalPanel {
                 @Override
                 public void onClick(final AjaxRequestTarget target, final LinkedAccountTO linkedAccountTO) {
                     try {
-                        LinkedAccountUR linkedAccountPatch = new LinkedAccountUR.Builder().
+                        LinkedAccountUR linkedAccountUR = new LinkedAccountUR.Builder().
                                 operation(PatchOperation.DELETE).
                                 linkedAccountTO(linkedAccountTO).build();
-                        linkedAccountPatch.setLinkedAccountTO(linkedAccountTO);
-                        UserUR patch = new UserUR();
-                        patch.setKey(model.getObject().getKey());
-                        patch.getLinkedAccounts().add(linkedAccountPatch);
-                        model.setObject(userRestClient.update(model.getObject().getETagValue(), patch).getEntity());
+
+                        UserUR req = new UserUR();
+                        req.setKey(model.getObject().getKey());
+                        req.getLinkedAccounts().add(linkedAccountUR);
+                        model.setObject(userRestClient.update(model.getObject().getETagValue(), req).getEntity());
                         linkedAccountTOs.remove(linkedAccountTO);
 
                         SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
@@ -293,8 +337,8 @@ public class LinkedAccountModalPanel extends Panel implements ModalPanel {
 
                 // this opens the wizard (set above) in CREATE mode
                 send(list, Broadcast.DEPTH, new AjaxWizard.NewItemActionEvent<>(new LinkedAccountTO(), target).
-                        setResourceModel(new StringResourceModel("inner.create.linkedAccount",
-                                LinkedAccountModalPanel.this)));
+                        setResourceModel(
+                                new StringResourceModel("inner.create.linkedAccount", LinkedAccountModalPanel.this)));
             }
         };
         list.addOrReplaceInnerObject(addAjaxLink.setEnabled(!recounciliationOnly).setVisible(!recounciliationOnly));
@@ -303,9 +347,7 @@ public class LinkedAccountModalPanel extends Panel implements ModalPanel {
     }
 
     private void sortLinkedAccounts() {
-        Collections.sort(linkedAccountTOs,
-                (o1, o2) -> AnyTypeRestClient.KEY_COMPARATOR.compare(
-                        o1.getConnObjectKeyValue(), o2.getConnObjectKeyValue()));
+        linkedAccountTOs.sort(Comparator.comparing(LinkedAccountTO::getConnObjectKeyValue));
     }
 
     private void checkAddButton() {
diff --git a/client/idm/console/src/main/java/org/apache/syncope/client/console/status/LinkedAccountStatusPanel.java b/client/idm/console/src/main/java/org/apache/syncope/client/console/status/LinkedAccountStatusPanel.java
new file mode 100644
index 0000000..ab42a0e
--- /dev/null
+++ b/client/idm/console/src/main/java/org/apache/syncope/client/console/status/LinkedAccountStatusPanel.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.status;
+
+import java.util.Optional;
+import org.apache.commons.lang3.tuple.Pair;
+import org.apache.syncope.client.console.panels.RemoteObjectPanel;
+import org.apache.syncope.client.console.wizards.any.ConnObjectPanel;
+import org.apache.syncope.client.ui.commons.Constants;
+import org.apache.syncope.common.lib.to.ConnObjectTO;
+import org.apache.syncope.common.lib.to.ReconStatus;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.ResourceModel;
+
+public class LinkedAccountStatusPanel extends RemoteObjectPanel {
+
+    private static final long serialVersionUID = 7662852503618434902L;
+
+    private final String resource;
+
+    private final String anyTypeKey;
+
+    private final String connObjectKeyValue;
+
+    public LinkedAccountStatusPanel(
+            final String resource,
+            final String anyTypeKey,
+            final String connObjectKeyValue) {
+
+        this.resource = resource;
+        this.anyTypeKey = anyTypeKey;
+        this.connObjectKeyValue = connObjectKeyValue;
+
+        add(new ConnObjectPanel(
+                REMOTE_OBJECT_PANEL_ID,
+                Pair.<IModel<?>, IModel<?>>of(Model.of(Constants.SYNCOPE), new ResourceModel("resource")),
+                getConnObjectTOs(),
+                false));
+    }
+
+    @Override
+    protected Pair<ConnObjectTO, ConnObjectTO> getConnObjectTOs() {
+        Optional<ReconStatus> status = ReconStatusUtils.getReconStatus(anyTypeKey, connObjectKeyValue, resource);
+
+        return status.isPresent()
+                ? Pair.of(status.get().getOnSyncope(), status.get().getOnResource())
+                : null;
+    }
+}
diff --git a/client/idm/console/src/main/java/org/apache/syncope/client/console/status/ReconStatusUtils.java b/client/idm/console/src/main/java/org/apache/syncope/client/console/status/ReconStatusUtils.java
index 9da9dcf..9fba8d5 100644
--- a/client/idm/console/src/main/java/org/apache/syncope/client/console/status/ReconStatusUtils.java
+++ b/client/idm/console/src/main/java/org/apache/syncope/client/console/status/ReconStatusUtils.java
@@ -22,6 +22,7 @@ import java.io.Serializable;
 import java.util.Collection;
 import java.util.List;
 import java.util.Objects;
+import java.util.Optional;
 import java.util.stream.Collectors;
 import org.apache.commons.lang3.tuple.Pair;
 import org.apache.syncope.client.console.rest.ReconciliationRestClient;
@@ -36,6 +37,19 @@ public final class ReconStatusUtils implements Serializable {
 
     private static final Logger LOG = LoggerFactory.getLogger(ReconStatusUtils.class);
 
+    public static Optional<ReconStatus> getReconStatus(
+            final String anyTypeKey, final String connObjectKeyValue, final String resource) {
+
+        ReconStatus result = null;
+        try {
+            result = ReconciliationRestClient.status(
+                    new ReconQuery.Builder(anyTypeKey, resource).connObjectKeyValue(connObjectKeyValue).build());
+        } catch (Exception e) {
+            LOG.warn("Unexpected error for {} {} on {}", anyTypeKey, connObjectKeyValue, resource, e);
+        }
+        return Optional.ofNullable(result);
+    }
+
     public static List<Pair<String, ReconStatus>> getReconStatuses(
             final String anyTypeKey, final String anyKey, final Collection<String> resources) {
 
diff --git a/client/idm/console/src/main/java/org/apache/syncope/client/console/wizards/any/LinkedAccountWizardBuilder.java b/client/idm/console/src/main/java/org/apache/syncope/client/console/wizards/any/LinkedAccountWizardBuilder.java
index ae5076d..e9115b8 100644
--- a/client/idm/console/src/main/java/org/apache/syncope/client/console/wizards/any/LinkedAccountWizardBuilder.java
+++ b/client/idm/console/src/main/java/org/apache/syncope/client/console/wizards/any/LinkedAccountWizardBuilder.java
@@ -124,5 +124,4 @@ public class LinkedAccountWizardBuilder extends BaseAjaxWizardBuilder<LinkedAcco
             return userTO;
         }
     }
-
 }
diff --git a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel.html b/client/idm/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel.html
similarity index 100%
rename from client/idrepo/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel.html
rename to client/idm/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel.html
diff --git a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel.properties b/client/idm/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel.properties
similarity index 97%
rename from client/idrepo/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel.properties
rename to client/idm/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel.properties
index 5f28a07..c940948 100644
--- a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel.properties
+++ b/client/idm/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel.properties
@@ -19,3 +19,4 @@ suspended=Suspended
 connObjectKeyValue=External key
 inner.edit.linkedAccount=Edit account
 inner.create.linkedAccount=Create account
+enable.title=toggle suspend
diff --git a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel_fr_CA.properties b/client/idm/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel_fr_CA.properties
similarity index 88%
rename from client/idrepo/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel_fr_CA.properties
rename to client/idm/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel_fr_CA.properties
index 10d7591..9c61b76 100644
--- a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel_fr_CA.properties
+++ b/client/idm/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel_fr_CA.properties
@@ -16,6 +16,7 @@
 # under the License.
 resource=Ressource
 suspended=Suspendu
-connObjectKeyValue=Cl� externe
+connObjectKeyValue=Cl\u00e9 externe
 inner.edit.linkedAccount=Modifier le compte
-inner.create.linkedAccount=Cr�er un compte
+inner.create.linkedAccount=Cr\u00e9er un compte
+enable.title=toggle suspend
diff --git a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel_it.properties b/client/idm/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel_it.properties
similarity index 96%
rename from client/idrepo/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel_it.properties
rename to client/idm/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel_it.properties
index ce0bcf8..9b993e7 100644
--- a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel_it.properties
+++ b/client/idm/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel_it.properties
@@ -19,3 +19,4 @@ suspended=Sospeso
 connObjectKeyValue=Chiave esterna
 inner.edit.linkedAccount=Modifica account
 inner.create.linkedAccount=Crea account
+enable.title=sospendi / attiva
diff --git a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel_ja.properties b/client/idm/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel_ja.properties
similarity index 97%
rename from client/idrepo/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel_ja.properties
rename to client/idm/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel_ja.properties
index b825afb..f6665d7 100644
--- a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel_ja.properties
+++ b/client/idm/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel_ja.properties
@@ -19,3 +19,4 @@ suspended=\u4e00\u6642\u505c\u6b62
 connObjectKeyValue=\u5916\u90e8\u30ad\u30fc
 inner.edit.linkedAccount=\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u7de8\u96c6
 inner.create.linkedAccount=\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u4f5c\u6210\u3059\u308b
+enable.title=toggle suspend
diff --git a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel_pt_BR.properties b/client/idm/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel_pt_BR.properties
similarity index 97%
rename from client/idrepo/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel_pt_BR.properties
rename to client/idm/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel_pt_BR.properties
index 62a2310..9bc9b81 100644
--- a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel_pt_BR.properties
+++ b/client/idm/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel_pt_BR.properties
@@ -19,3 +19,4 @@ suspended=Suspenso
 connObjectKeyValue=Chave externa
 inner.edit.linkedAccount=Editar conta
 inner.create.linkedAccount=Criar Conta
+enable.title=toggle suspend
diff --git a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel_ru.properties b/client/idm/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel_ru.properties
similarity index 97%
rename from client/idrepo/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel_ru.properties
rename to client/idm/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel_ru.properties
index 8a337d3..0baa94f 100644
--- a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel_ru.properties
+++ b/client/idm/console/src/main/resources/org/apache/syncope/client/console/panels/LinkedAccountModalPanel_ru.properties
@@ -19,3 +19,4 @@ suspended=\u043f\u043e\u0434\u0432\u0435\u0448\u0435\u043d\u043d\u044b\u0439
 connObjectKeyValue=\u0412\u043d\u0435\u0448\u043d\u0438\u0439 \u043a\u043b\u044e\u0447
 inner.edit.linkedAccount=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u043a\u043a\u0430\u0443\u043d\u0442
 inner.create.linkedAccount=\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f
+enable.title=toggle suspend
diff --git a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/commons/IdRepoStatusProvider.java b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/commons/IdRepoStatusProvider.java
index 014affa..93deafa 100644
--- a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/commons/IdRepoStatusProvider.java
+++ b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/commons/IdRepoStatusProvider.java
@@ -21,6 +21,8 @@ package org.apache.syncope.client.console.commons;
 import java.io.Serializable;
 import java.util.Collection;
 import java.util.List;
+import java.util.Optional;
+import org.apache.commons.lang3.tuple.Pair;
 import org.apache.commons.lang3.tuple.Triple;
 import org.apache.syncope.client.console.panels.ListViewPanel;
 import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
@@ -33,6 +35,13 @@ public class IdRepoStatusProvider implements StatusProvider {
     private static final long serialVersionUID = -7948190795547208134L;
 
     @Override
+    public Optional<Pair<ConnObjectTO, ConnObjectTO>> get(
+            final String anyTypeKey, final String connObjectKeyValue, final String resource) {
+
+        return Optional.empty();
+    }
+
+    @Override
     public List<Triple<ConnObjectTO, ConnObjectWrapper, String>> get(
             final AnyTO any, final Collection<String> resources) {
 
diff --git a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/commons/StatusProvider.java b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/commons/StatusProvider.java
index 36d5ba4..114419f 100644
--- a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/commons/StatusProvider.java
+++ b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/commons/StatusProvider.java
@@ -21,6 +21,8 @@ package org.apache.syncope.client.console.commons;
 import java.io.Serializable;
 import java.util.Collection;
 import java.util.List;
+import java.util.Optional;
+import org.apache.commons.lang3.tuple.Pair;
 import org.apache.commons.lang3.tuple.Triple;
 import org.apache.syncope.client.console.panels.ListViewPanel;
 import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
@@ -30,6 +32,9 @@ import org.apache.syncope.common.lib.to.ConnObjectTO;
 
 public interface StatusProvider extends Serializable {
 
+    Optional<Pair<ConnObjectTO, ConnObjectTO>> get(
+            String anyTypeKey, String connObjectKeyValue, String resource);
+
     List<Triple<ConnObjectTO, ConnObjectWrapper, String>> get(AnyTO any, Collection<String> resources);
 
     <T extends Serializable> void addConnObjectLink(
diff --git a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/ListViewPanel.java b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/ListViewPanel.java
index 5395b39..b0d39ef 100644
--- a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/ListViewPanel.java
+++ b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/ListViewPanel.java
@@ -158,7 +158,7 @@ public abstract class ListViewPanel<T extends Serializable> extends WizardMgtPan
 
         beans = new ListView<T>("beans", listOfItems) {
 
-            private static final long serialVersionUID = 1L;
+            private static final long serialVersionUID = -9112553137618363167L;
 
             @Override
             protected void populateItem(final ListItem<T> beanItem) {
@@ -218,7 +218,7 @@ public abstract class ListViewPanel<T extends Serializable> extends WizardMgtPan
     private static ListView<String> header(final List<String> labels) {
         return new ListView<String>("names", labels) {
 
-            private static final long serialVersionUID = 1L;
+            private static final long serialVersionUID = -9112553137618363167L;
 
             @Override
             protected void populateItem(final ListItem<String> item) {
diff --git a/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/to/LinkedAccountTO.java b/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/to/LinkedAccountTO.java
index 05c6261..4697cd1 100644
--- a/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/to/LinkedAccountTO.java
+++ b/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/to/LinkedAccountTO.java
@@ -87,6 +87,7 @@ public class LinkedAccountTO implements EntityTO {
 
     private final Set<String> privileges = new HashSet<>();
 
+    @Override
     public String getKey() {
         return key;
     }