syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [1/2] syncope git commit: [SYNCOPE-470] Missing push policy setting for Resources
Date Mon, 18 Jun 2018 11:45:02 GMT
Repository: syncope
Updated Branches:
  refs/heads/master 2b48b6191 -> afedf20aa


[SYNCOPE-470] Missing push policy setting for Resources


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

Branch: refs/heads/master
Commit: b0fe323b40c61a31f30d5e5360a817672dc1d7a8
Parents: 2b48b61
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Mon Jun 18 13:32:45 2018 +0200
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Mon Jun 18 13:32:45 2018 +0200

----------------------------------------------------------------------
 .../resources/ResourceSecurityPanel.java        | 25 ++++++++++++++++++++
 .../resources/ResourceSecurityPanel.html        |  3 +++
 .../resources/ResourceSecurityPanel.properties  |  1 +
 .../ResourceSecurityPanel_it.properties         |  1 +
 .../ResourceSecurityPanel_ja.properties         |  1 +
 .../ResourceSecurityPanel_pt_BR.properties      |  1 +
 .../ResourceSecurityPanel_ru.properties         |  1 +
 7 files changed, 33 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/b0fe323b/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel.java
index 72ba53d..4a72fb9 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel.java
@@ -81,6 +81,17 @@ public class ResourceSecurityPanel extends WizardStep {
         }
     };
 
+    private final IModel<Map<String, String>> pushPolicies = new LoadableDetachableModel<Map<String,
String>>() {
+
+        private static final long serialVersionUID = 9089911876466472133L;
+
+        @Override
+        protected Map<String, String> load() {
+            return policyRestClient.getPolicies(PolicyType.PUSH).stream().
+                    collect(Collectors.toMap(PolicyTO::getKey, PolicyTO::getDescription));
+        }
+    };
+
     public ResourceSecurityPanel(final ResourceTO resourceTO) {
         super();
         setOutputMarkupId(true);
@@ -131,5 +142,19 @@ public class ResourceSecurityPanel extends WizardStep {
         ((DropDownChoice<?>) pullPolicy.getField()).setNullValid(true);
         container.add(pullPolicy);
         // -------------------------------
+
+        // -------------------------------
+        // Pull policy selection
+        // -------------------------------
+        AjaxDropDownChoicePanel<String> pushPolicy = new AjaxDropDownChoicePanel<>(
+                "pushPolicy",
+                new ResourceModel("pushPolicy", "pushPolicy").getObject(),
+                new PropertyModel<>(resourceTO, "pushPolicy"),
+                false);
+        pushPolicy.setChoiceRenderer(new PolicyRenderer(pushPolicies));
+        pushPolicy.setChoices(new ArrayList<>(pushPolicies.getObject().keySet()));
+        ((DropDownChoice<?>) pushPolicy.getField()).setNullValid(true);
+        container.add(pushPolicy);
+        // -------------------------------
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/b0fe323b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel.html
b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel.html
index 5177e26..fea39ff 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel.html
@@ -28,6 +28,9 @@ under the License.
       <span wicket:id="pullPolicy">
         [panel for dynamic input type markup]
       </span>
+      <span wicket:id="pushPolicy">
+        [panel for dynamic input type markup]
+      </span>
     </div>
   </wicket:panel>
 </html>

http://git-wip-us.apache.org/repos/asf/syncope/blob/b0fe323b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel.properties
b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel.properties
index 0d2d9c4..e4a70ca 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel.properties
@@ -17,3 +17,4 @@
 passwordPolicy=Password Policy
 accountPolicy=Account Policy
 pullPolicy=Pull Policy
+pushPolicy=Push Policy

http://git-wip-us.apache.org/repos/asf/syncope/blob/b0fe323b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel_it.properties
b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel_it.properties
index 0d2d9c4..e4a70ca 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel_it.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel_it.properties
@@ -17,3 +17,4 @@
 passwordPolicy=Password Policy
 accountPolicy=Account Policy
 pullPolicy=Pull Policy
+pushPolicy=Push Policy

http://git-wip-us.apache.org/repos/asf/syncope/blob/b0fe323b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel_ja.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel_ja.properties
b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel_ja.properties
index 270ff71..6f8187c 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel_ja.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel_ja.properties
@@ -17,3 +17,4 @@
 passwordPolicy=\u30d1\u30b9\u30ef\u30fc\u30c9\u30dd\u30ea\u30b7\u30fc
 accountPolicy=\u30a2\u30ab\u30a6\u30f3\u30c8\u30dd\u30ea\u30b7\u30fc
 pullPolicy=\u30d7\u30eb\u30dd\u30ea\u30b7\u30fc
+pushPolicy=Push Policy

http://git-wip-us.apache.org/repos/asf/syncope/blob/b0fe323b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel_pt_BR.properties
b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel_pt_BR.properties
index 48e925f..7300d71 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel_pt_BR.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel_pt_BR.properties
@@ -17,3 +17,4 @@
 passwordPolicy=Pol\u00edtica de Senha
 accountPolicy=Pol\u00edtica de Conta
 pullPolicy=Pol\u00edtica de Pull
+pushPolicy=Push Policy

http://git-wip-us.apache.org/repos/asf/syncope/blob/b0fe323b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel_ru.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel_ru.properties
b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel_ru.properties
index 29eae11..7d70763 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel_ru.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/resources/ResourceSecurityPanel_ru.properties
@@ -18,3 +18,4 @@
 passwordPolicy = \u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u043f\u0430\u0440\u043e\u043b\u0435\u0439
 accountPolicy = \u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u0443\u0447\u0435\u0442\u043d\u044b\u0445
\u0437\u0430\u043f\u0438\u0441\u0435\u0439
 pullPolicy=\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f
\u0434\u0430\u043d\u043d\u044b\u0445
+pushPolicy=Push Policy


Mime
View raw message