You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by fm...@apache.org on 2017/06/28 07:33:35 UTC

syncope git commit: [SYNCOPE-1053] hides and disables approval details in case of formTO missing userTO

Repository: syncope
Updated Branches:
  refs/heads/master 53c54d7f1 -> e96d9c57c


[SYNCOPE-1053] hides and disables approval details in case of formTO missing userTO


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/e96d9c57
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/e96d9c57
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/e96d9c57

Branch: refs/heads/master
Commit: e96d9c57c8d24ddb4dd3a6b30c27dc4fb24dedee
Parents: 53c54d7
Author: fmartelli <fa...@gmail.com>
Authored: Wed Jun 28 09:33:15 2017 +0200
Committer: fmartelli <fa...@gmail.com>
Committed: Wed Jun 28 09:33:15 2017 +0200

----------------------------------------------------------------------
 .../org/apache/syncope/client/console/approvals/Approval.java     | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/e96d9c57/client/console/src/main/java/org/apache/syncope/client/console/approvals/Approval.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/approvals/Approval.java b/client/console/src/main/java/org/apache/syncope/client/console/approvals/Approval.java
index bd558f5..d56dab8 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/approvals/Approval.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/approvals/Approval.java
@@ -195,6 +195,9 @@ public abstract class Approval extends Panel {
         };
         MetaDataRoleAuthorizationStrategy.authorize(userDetails, ENABLE, StandardEntitlement.USER_READ);
 
+        final boolean enabled = formTO.getUserTO() != null;
+        userDetails.setVisible(enabled).setEnabled(enabled);
+
         add(propView);
         add(userDetails);
     }