(syncope) branch master updated: [SYNCOPE-1811] MFA bypass properties (#665)
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/master by this push: new f0c6d044c7 [SYNCOPE-1811] MFA bypass properties (#665) f0c6d044c7 is described below commit f0c6d044c7411941f8fc2cbaea438a3da9c35b1b Author: mdisabatino AuthorDate: Wed Mar 27 16:51:00 2024 +0100 [SYNCOPE-1811] MFA bypass properties (#665) --- .../console/policies/AuthPolicyModalPanel.java | 19 ++ .../console/policies/AuthPolicyModalPanel.html | 9 +++ .../policies/PolicyDirectoryPanel.properties | 3 +++ .../policies/PolicyDirectoryPanel_fr_CA.properties | 3 +++ .../policies/PolicyDirectoryPanel_it.properties| 3 +++ .../policies/PolicyDirectoryPanel_ja.properties| 4 +++ .../policies/PolicyDirectoryPanel_pt_BR.properties | 3 +++ .../policies/PolicyDirectoryPanel_ru.properties| 3 +++ .../common/lib/policy/DefaultAuthPolicyConf.java | 30 ++ .../wa/starter/mapping/DefaultAuthMapper.java | 16 +--- 10 files changed, 90 insertions(+), 3 deletions(-) diff --git a/client/am/console/src/main/java/org/apache/syncope/client/console/policies/AuthPolicyModalPanel.java b/client/am/console/src/main/java/org/apache/syncope/client/console/policies/AuthPolicyModalPanel.java index eec6a0b236..76833d3574 100644 --- a/client/am/console/src/main/java/org/apache/syncope/client/console/policies/AuthPolicyModalPanel.java +++ b/client/am/console/src/main/java/org/apache/syncope/client/console/policies/AuthPolicyModalPanel.java @@ -28,6 +28,7 @@ import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.Bas import org.apache.syncope.client.ui.commons.Constants; import org.apache.syncope.client.ui.commons.markup.html.form.AjaxCheckBoxPanel; import org.apache.syncope.client.ui.commons.markup.html.form.AjaxPalettePanel; +import org.apache.syncope.client.ui.commons.markup.html.form.AjaxTextFieldPanel; import org.apache.syncope.client.ui.commons.pages.BaseWebPage; import org.apache.syncope.common.lib.policy.AuthPolicyTO; import org.apache.syncope.common.lib.to.AuthModuleTO; @@ -79,6 +80,24 @@ public class AuthPolicyModalPanel extends AbstractModalPanel { "authModules", new PropertyModel<>(model.getObject().getConf(), "authModules"), allAuthModules)); + +add(new AjaxCheckBoxPanel( +"bypassEnabled", +"bypassEnabled", +new PropertyModel<>(model.getObject().getConf(), "bypassEnabled"), +false)); + +add(new AjaxTextFieldPanel( +"bypassPrincipalAttributeName", +"bypassPrincipalAttributeName", +new PropertyModel<>(model.getObject().getConf(), "bypassPrincipalAttributeName"), +false)); + +add(new AjaxTextFieldPanel( +"bypassPrincipalAttributeValue", +"bypassPrincipalAttributeValue", +new PropertyModel<>(model.getObject().getConf(), "bypassPrincipalAttributeValue"), +false)); } @Override diff --git a/client/am/console/src/main/resources/org/apache/syncope/client/console/policies/AuthPolicyModalPanel.html b/client/am/console/src/main/resources/org/apache/syncope/client/console/policies/AuthPolicyModalPanel.html index b71bbf3fe2..e66a972c85 100644 --- a/client/am/console/src/main/resources/org/apache/syncope/client/console/policies/AuthPolicyModalPanel.html +++ b/client/am/console/src/main/resources/org/apache/syncope/client/console/policies/AuthPolicyModalPanel.html @@ -24,5 +24,14 @@ under the License. + + + + + + + + + diff --git a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel.properties b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel.properties index 0f90076df1..d5451c65bd 100644 --- a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel.properties +++ b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel.properties @@ -55,3 +55,6 @@ enable.stConf=Enable ST enable.proxyTgtConf=Enable Proxy TGT enable.proxyStConf=Enable Proxy ST auditHistory.title=Configuration history +bypassEnabled=Enable Bypass +bypassPrincipalAttributeName=Bypass Principal Attribute Name +bypassPrincipalAttributeValue=Bypass Principal Attribute Value diff --git a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel_fr_CA.properti
(syncope) branch 3_0_X updated: [SYNCOPE-1811] MFA bypass properties (#665)
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 3_0_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/3_0_X by this push: new f55f7ff2b5 [SYNCOPE-1811] MFA bypass properties (#665) f55f7ff2b5 is described below commit f55f7ff2b5cd54e235066f7610d502eaa3ea89ae Author: mdisabatino AuthorDate: Wed Mar 27 16:51:00 2024 +0100 [SYNCOPE-1811] MFA bypass properties (#665) --- .../console/policies/AuthPolicyModalPanel.java | 19 ++ .../console/policies/AuthPolicyModalPanel.html | 9 +++ .../policies/PolicyDirectoryPanel.properties | 3 +++ .../policies/PolicyDirectoryPanel_fr_CA.properties | 3 +++ .../policies/PolicyDirectoryPanel_it.properties| 3 +++ .../policies/PolicyDirectoryPanel_ja.properties| 4 +++ .../policies/PolicyDirectoryPanel_pt_BR.properties | 3 +++ .../policies/PolicyDirectoryPanel_ru.properties| 3 +++ .../common/lib/policy/DefaultAuthPolicyConf.java | 30 ++ .../wa/starter/mapping/DefaultAuthMapper.java | 16 +--- 10 files changed, 90 insertions(+), 3 deletions(-) diff --git a/client/am/console/src/main/java/org/apache/syncope/client/console/policies/AuthPolicyModalPanel.java b/client/am/console/src/main/java/org/apache/syncope/client/console/policies/AuthPolicyModalPanel.java index eec6a0b236..76833d3574 100644 --- a/client/am/console/src/main/java/org/apache/syncope/client/console/policies/AuthPolicyModalPanel.java +++ b/client/am/console/src/main/java/org/apache/syncope/client/console/policies/AuthPolicyModalPanel.java @@ -28,6 +28,7 @@ import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.Bas import org.apache.syncope.client.ui.commons.Constants; import org.apache.syncope.client.ui.commons.markup.html.form.AjaxCheckBoxPanel; import org.apache.syncope.client.ui.commons.markup.html.form.AjaxPalettePanel; +import org.apache.syncope.client.ui.commons.markup.html.form.AjaxTextFieldPanel; import org.apache.syncope.client.ui.commons.pages.BaseWebPage; import org.apache.syncope.common.lib.policy.AuthPolicyTO; import org.apache.syncope.common.lib.to.AuthModuleTO; @@ -79,6 +80,24 @@ public class AuthPolicyModalPanel extends AbstractModalPanel { "authModules", new PropertyModel<>(model.getObject().getConf(), "authModules"), allAuthModules)); + +add(new AjaxCheckBoxPanel( +"bypassEnabled", +"bypassEnabled", +new PropertyModel<>(model.getObject().getConf(), "bypassEnabled"), +false)); + +add(new AjaxTextFieldPanel( +"bypassPrincipalAttributeName", +"bypassPrincipalAttributeName", +new PropertyModel<>(model.getObject().getConf(), "bypassPrincipalAttributeName"), +false)); + +add(new AjaxTextFieldPanel( +"bypassPrincipalAttributeValue", +"bypassPrincipalAttributeValue", +new PropertyModel<>(model.getObject().getConf(), "bypassPrincipalAttributeValue"), +false)); } @Override diff --git a/client/am/console/src/main/resources/org/apache/syncope/client/console/policies/AuthPolicyModalPanel.html b/client/am/console/src/main/resources/org/apache/syncope/client/console/policies/AuthPolicyModalPanel.html index b71bbf3fe2..e66a972c85 100644 --- a/client/am/console/src/main/resources/org/apache/syncope/client/console/policies/AuthPolicyModalPanel.html +++ b/client/am/console/src/main/resources/org/apache/syncope/client/console/policies/AuthPolicyModalPanel.html @@ -24,5 +24,14 @@ under the License. + + + + + + + + + diff --git a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel.properties b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel.properties index 0f90076df1..d5451c65bd 100644 --- a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel.properties +++ b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel.properties @@ -55,3 +55,6 @@ enable.stConf=Enable ST enable.proxyTgtConf=Enable Proxy TGT enable.proxyStConf=Enable Proxy ST auditHistory.title=Configuration history +bypassEnabled=Enable Bypass +bypassPrincipalAttributeName=Bypass Principal Attribute Name +bypassPrincipalAttributeValue=Bypass Principal Attribute Value diff --git a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel_fr_CA.properti
(syncope) branch ConnectorDetailsPanel created (now 27bd7b1661)
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a change to branch ConnectorDetailsPanel in repository https://gitbox.apache.org/repos/asf/syncope.git at 27bd7b1661 Upgrading OpenSearch No new revisions were added by this update.
[syncope] branch master updated: [SYNCOPE-1733] Added OAuth20 AuthModule (#414)
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/master by this push: new b591939cf1 [SYNCOPE-1733] Added OAuth20 AuthModule (#414) b591939cf1 is described below commit b591939cf1dd1764cb98fb6bb788cb376d2b5d0e Author: mdisabatino AuthorDate: Fri Feb 24 13:32:43 2023 +0100 [SYNCOPE-1733] Added OAuth20 AuthModule (#414) * [SYNCOPE-1733] Added OAuth20 AuthModule * [SYNCOPE-1733] Fix code scanning * [SYNCOPE-1733] Fix code scanning --- .../lib/auth/AbstractOIDCAuthModuleConf.java | 121 + .../syncope/common/lib/auth/AuthModuleConf.java| 2 + .../common/lib/auth/OAuth20AuthModuleConf.java | 93 .../common/lib/auth/OIDCAuthModuleConf.java| 78 + .../src/test/resources/domains/MasterContent.xml | 3 + .../src/test/resources/domains/MasterContent.xml | 2 + .../apache/syncope/fit/core/AuthModuleITCase.java | 59 +- .../bootstrap/AuthModulePropertySourceMapper.java | 23 .../AuthModulePropertySourceMapperTest.java| 28 + 9 files changed, 331 insertions(+), 78 deletions(-) diff --git a/common/am/lib/src/main/java/org/apache/syncope/common/lib/auth/AbstractOIDCAuthModuleConf.java b/common/am/lib/src/main/java/org/apache/syncope/common/lib/auth/AbstractOIDCAuthModuleConf.java new file mode 100644 index 00..9d4b577437 --- /dev/null +++ b/common/am/lib/src/main/java/org/apache/syncope/common/lib/auth/AbstractOIDCAuthModuleConf.java @@ -0,0 +1,121 @@ +/* + * 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.common.lib.auth; + +import java.util.LinkedHashMap; +import java.util.Map; + +public abstract class AbstractOIDCAuthModuleConf extends Pac4jAuthModuleConf { + +protected String clientId; + +protected String clientSecret; + +protected String clientName; + +protected boolean enabled; + +protected Map customParams = new LinkedHashMap<>(); + +protected String tokenUrl; + +protected String responseType = "code"; + +protected String scope; + +protected String userIdAttribute; + +public String getClientId() { +return clientId; +} + +public void setId(final String clientId) { +this.clientId = clientId; +} + +public String getClientSecret() { +return clientSecret; +} + +public void setClientSecret(final String clientSecret) { +this.clientSecret = clientSecret; +} + +@Override +public String getClientName() { +return clientName; +} + +@Override +public void setClientName(final String clientName) { +this.clientName = clientName; +} + +public boolean isEnabled() { +return enabled; +} + +public void setEnabled(final boolean enabled) { +this.enabled = enabled; +} + +public Map getCustomParams() { +return customParams; +} + +public void setCustomParams(final Map customParams) { +this.customParams = customParams; +} + +public String getTokenUrl() { +return tokenUrl; +} + +public void setTokenUrl(final String tokenUrl) { +this.tokenUrl = tokenUrl; +} + +public String getResponseType() { +return responseType; +} + +public void setResponseType(final String responseType) { +this.responseType = responseType; +} + +public String getScope() { +return scope; +} + +public void setScope(final String scope) { +this.scope = scope; +} + +public void setClientId(final String clientId) { +this.clientId = clientId; +} + +public String getUserIdAttribute() { +return userIdAttribute; +} + +public void setUserIdAttribute(final String userIdAttribute) { +this.userIdAttribute = userIdAttribute; +} +} diff --git a/common/am/lib/src/main/java/org/apache/syncope/common/lib/auth/AuthModuleConf.java b/common/am/lib/src/main/java/org/apache/syncope/commo
[syncope] branch 3_0_X updated: [SYNCOPE-1733] Added OAuth20 AuthModule (#414)
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 3_0_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/3_0_X by this push: new 54f0304156 [SYNCOPE-1733] Added OAuth20 AuthModule (#414) 54f0304156 is described below commit 54f030415641f46ee4c92e3e4c61d62a644ea03f Author: mdisabatino AuthorDate: Fri Feb 24 13:32:43 2023 +0100 [SYNCOPE-1733] Added OAuth20 AuthModule (#414) * [SYNCOPE-1733] Added OAuth20 AuthModule * [SYNCOPE-1733] Fix code scanning * [SYNCOPE-1733] Fix code scanning --- .../lib/auth/AbstractOIDCAuthModuleConf.java | 121 + .../syncope/common/lib/auth/AuthModuleConf.java| 2 + .../common/lib/auth/OAuth20AuthModuleConf.java | 93 .../common/lib/auth/OIDCAuthModuleConf.java| 78 + .../src/test/resources/domains/MasterContent.xml | 3 + .../src/test/resources/domains/MasterContent.xml | 2 + .../apache/syncope/fit/core/AuthModuleITCase.java | 59 +- .../bootstrap/AuthModulePropertySourceMapper.java | 23 .../AuthModulePropertySourceMapperTest.java| 28 + 9 files changed, 331 insertions(+), 78 deletions(-) diff --git a/common/am/lib/src/main/java/org/apache/syncope/common/lib/auth/AbstractOIDCAuthModuleConf.java b/common/am/lib/src/main/java/org/apache/syncope/common/lib/auth/AbstractOIDCAuthModuleConf.java new file mode 100644 index 00..9d4b577437 --- /dev/null +++ b/common/am/lib/src/main/java/org/apache/syncope/common/lib/auth/AbstractOIDCAuthModuleConf.java @@ -0,0 +1,121 @@ +/* + * 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.common.lib.auth; + +import java.util.LinkedHashMap; +import java.util.Map; + +public abstract class AbstractOIDCAuthModuleConf extends Pac4jAuthModuleConf { + +protected String clientId; + +protected String clientSecret; + +protected String clientName; + +protected boolean enabled; + +protected Map customParams = new LinkedHashMap<>(); + +protected String tokenUrl; + +protected String responseType = "code"; + +protected String scope; + +protected String userIdAttribute; + +public String getClientId() { +return clientId; +} + +public void setId(final String clientId) { +this.clientId = clientId; +} + +public String getClientSecret() { +return clientSecret; +} + +public void setClientSecret(final String clientSecret) { +this.clientSecret = clientSecret; +} + +@Override +public String getClientName() { +return clientName; +} + +@Override +public void setClientName(final String clientName) { +this.clientName = clientName; +} + +public boolean isEnabled() { +return enabled; +} + +public void setEnabled(final boolean enabled) { +this.enabled = enabled; +} + +public Map getCustomParams() { +return customParams; +} + +public void setCustomParams(final Map customParams) { +this.customParams = customParams; +} + +public String getTokenUrl() { +return tokenUrl; +} + +public void setTokenUrl(final String tokenUrl) { +this.tokenUrl = tokenUrl; +} + +public String getResponseType() { +return responseType; +} + +public void setResponseType(final String responseType) { +this.responseType = responseType; +} + +public String getScope() { +return scope; +} + +public void setScope(final String scope) { +this.scope = scope; +} + +public void setClientId(final String clientId) { +this.clientId = clientId; +} + +public String getUserIdAttribute() { +return userIdAttribute; +} + +public void setUserIdAttribute(final String userIdAttribute) { +this.userIdAttribute = userIdAttribute; +} +} diff --git a/common/am/lib/src/main/java/org/apache/syncope/common/lib/auth/AuthModuleConf.java b/common/am/lib/src/main/java/org/apache/syncope/commo
[syncope] branch SYNCOPE-1733 updated (a4f19d6ec8 -> 182f506e99)
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a change to branch SYNCOPE-1733 in repository https://gitbox.apache.org/repos/asf/syncope.git from a4f19d6ec8 [SYNCOPE-1733] Fix code scanning add 182f506e99 [SYNCOPE-1733] Fix code scanning No new revisions were added by this update. Summary of changes: .../java/org/apache/syncope/common/lib/auth/OIDCAuthModuleConf.java | 5 - 1 file changed, 5 deletions(-)
[syncope] branch SYNCOPE-1733 updated (4f567302e5 -> a4f19d6ec8)
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a change to branch SYNCOPE-1733 in repository https://gitbox.apache.org/repos/asf/syncope.git from 4f567302e5 [SYNCOPE-1733] Added OAuth20 AuthModule add a4f19d6ec8 [SYNCOPE-1733] Fix code scanning No new revisions were added by this update. Summary of changes: .../common/lib/auth/OIDCAuthModuleConf.java| 40 -- 1 file changed, 40 deletions(-)
[syncope] 01/01: [SYNCOPE-1733] Added OAuth20 AuthModule
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch SYNCOPE-1733 in repository https://gitbox.apache.org/repos/asf/syncope.git commit 4f567302e53131106ec70793a5e2d2b13f0a4b40 Author: Marco Di Sabatino Di Diodoro AuthorDate: Thu Feb 23 17:14:35 2023 +0100 [SYNCOPE-1733] Added OAuth20 AuthModule --- .../lib/auth/AbstractOIDCAuthModuleConf.java | 121 + .../syncope/common/lib/auth/AuthModuleConf.java| 2 + .../common/lib/auth/OAuth20AuthModuleConf.java | 93 .../common/lib/auth/OIDCAuthModuleConf.java| 33 +- .../src/test/resources/domains/MasterContent.xml | 3 + .../src/test/resources/domains/MasterContent.xml | 2 + .../apache/syncope/fit/core/AuthModuleITCase.java | 59 +- .../bootstrap/AuthModulePropertySourceMapper.java | 23 .../AuthModulePropertySourceMapperTest.java| 28 + 9 files changed, 331 insertions(+), 33 deletions(-) diff --git a/common/am/lib/src/main/java/org/apache/syncope/common/lib/auth/AbstractOIDCAuthModuleConf.java b/common/am/lib/src/main/java/org/apache/syncope/common/lib/auth/AbstractOIDCAuthModuleConf.java new file mode 100644 index 00..9d4b577437 --- /dev/null +++ b/common/am/lib/src/main/java/org/apache/syncope/common/lib/auth/AbstractOIDCAuthModuleConf.java @@ -0,0 +1,121 @@ +/* + * 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.common.lib.auth; + +import java.util.LinkedHashMap; +import java.util.Map; + +public abstract class AbstractOIDCAuthModuleConf extends Pac4jAuthModuleConf { + +protected String clientId; + +protected String clientSecret; + +protected String clientName; + +protected boolean enabled; + +protected Map customParams = new LinkedHashMap<>(); + +protected String tokenUrl; + +protected String responseType = "code"; + +protected String scope; + +protected String userIdAttribute; + +public String getClientId() { +return clientId; +} + +public void setId(final String clientId) { +this.clientId = clientId; +} + +public String getClientSecret() { +return clientSecret; +} + +public void setClientSecret(final String clientSecret) { +this.clientSecret = clientSecret; +} + +@Override +public String getClientName() { +return clientName; +} + +@Override +public void setClientName(final String clientName) { +this.clientName = clientName; +} + +public boolean isEnabled() { +return enabled; +} + +public void setEnabled(final boolean enabled) { +this.enabled = enabled; +} + +public Map getCustomParams() { +return customParams; +} + +public void setCustomParams(final Map customParams) { +this.customParams = customParams; +} + +public String getTokenUrl() { +return tokenUrl; +} + +public void setTokenUrl(final String tokenUrl) { +this.tokenUrl = tokenUrl; +} + +public String getResponseType() { +return responseType; +} + +public void setResponseType(final String responseType) { +this.responseType = responseType; +} + +public String getScope() { +return scope; +} + +public void setScope(final String scope) { +this.scope = scope; +} + +public void setClientId(final String clientId) { +this.clientId = clientId; +} + +public String getUserIdAttribute() { +return userIdAttribute; +} + +public void setUserIdAttribute(final String userIdAttribute) { +this.userIdAttribute = userIdAttribute; +} +} diff --git a/common/am/lib/src/main/java/org/apache/syncope/common/lib/auth/AuthModuleConf.java b/common/am/lib/src/main/java/org/apache/syncope/common/lib/auth/AuthModuleConf.java index bb08dc9c14..c41588b85d 100644 --- a/common/am/lib/src/main/java/org/apache/syncope/common/lib/auth/AuthModuleConf.java +++ b/common/am/lib/src/main/java/org/apache/syncope/common/lib/auth/AuthModuleConf.java @@ -49,6 +49,8 @@ public interface AuthModuleConf
[syncope] branch SYNCOPE-1733 created (now 4f567302e5)
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a change to branch SYNCOPE-1733 in repository https://gitbox.apache.org/repos/asf/syncope.git at 4f567302e5 [SYNCOPE-1733] Added OAuth20 AuthModule This branch includes the following new commits: new 4f567302e5 [SYNCOPE-1733] Added OAuth20 AuthModule The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[syncope] branch master updated: Fix return param
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/master by this push: new f8b9ced Fix return param f8b9ced is described below commit f8b9cedf7543f42de019377c465fe4ff8769c966 Author: Marco Di Sabatino Di Diodoro AuthorDate: Wed Jul 21 11:06:21 2021 +0200 Fix return param --- .../java/org/apache/syncope/client/console/rest/SchemaRestClient.java | 3 +-- .../java/org/apache/syncope/client/enduser/rest/SchemaRestClient.java | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/rest/SchemaRestClient.java b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/rest/SchemaRestClient.java index 957de8a..fbf9681 100644 --- a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/rest/SchemaRestClient.java +++ b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/rest/SchemaRestClient.java @@ -110,9 +110,8 @@ public class SchemaRestClient extends BaseRestClient { return getSchemaNames(SchemaType.VIRTUAL); } -public static PlainSchemaTO read(final SchemaType schemaType, final String key) { +public static T read(final SchemaType schemaType, final String key) { return getService(SchemaService.class).read(schemaType, key); - } public static void create(final SchemaType schemaType, final SchemaTO modelObject) { diff --git a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/rest/SchemaRestClient.java b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/rest/SchemaRestClient.java index c89e35b..e897bf7 100644 --- a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/rest/SchemaRestClient.java +++ b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/rest/SchemaRestClient.java @@ -110,9 +110,8 @@ public class SchemaRestClient extends BaseRestClient { return getSchemaNames(SchemaType.VIRTUAL); } -public static PlainSchemaTO read(final SchemaType schemaType, final String key) { +public static T read(final SchemaType schemaType, final String key) { return getService(SchemaService.class).read(schemaType, key); - } public static void create(final SchemaType schemaType, final SchemaTO modelObject) {
[syncope] branch 2_1_X updated: Fix return param
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 2_1_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/2_1_X by this push: new 1a2a15f Fix return param 1a2a15f is described below commit 1a2a15f2108fc072e2680092d8d526b710f19c99 Author: Marco Di Sabatino Di Diodoro AuthorDate: Wed Jul 21 11:06:21 2021 +0200 Fix return param --- .../java/org/apache/syncope/client/console/rest/SchemaRestClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/SchemaRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/SchemaRestClient.java index 6e75036..8a7bfae 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/rest/SchemaRestClient.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/SchemaRestClient.java @@ -113,7 +113,7 @@ public class SchemaRestClient extends BaseRestClient { return getSchemaNames(SchemaType.VIRTUAL); } -public PlainSchemaTO read(final SchemaType schemaType, final String key) { +public T read(final SchemaType schemaType, final String key) { return getService(SchemaService.class).read(schemaType, key); }
[syncope] branch master updated: [SYNCOPE-1633] Confirm dialog custom message
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/master by this push: new 48ece56 [SYNCOPE-1633] Confirm dialog custom message 48ece56 is described below commit 48ece56217b561ac6892a4ea76cf7e045ead1326 Author: Marco Di Sabatino Di Diodoro AuthorDate: Tue May 18 11:28:37 2021 +0200 [SYNCOPE-1633] Confirm dialog custom message --- .../java/org/apache/syncope/client/ui/commons/Constants.java | 2 ++ .../client/console/wicket/markup/html/form/ActionLink.java| 11 +++ .../client/console/wicket/markup/html/form/ActionPanel.java | 6 +- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/Constants.java b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/Constants.java index 44258e5..ee8976a 100644 --- a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/Constants.java +++ b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/Constants.java @@ -83,6 +83,8 @@ public final class Constants { public static final String ACTION = "action"; +public static final String CONFIRM_DELETE = "confirmDelete"; + public static final String BEFORE_LOGOUT_PAGE = "beforeLogoutPage"; public static final String PARAM_PASSWORD_RESET_TOKEN = "pwdResetToken"; diff --git a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLink.java b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLink.java index d242da1..762ffe7 100644 --- a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLink.java +++ b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLink.java @@ -33,6 +33,8 @@ public abstract class ActionLink implements Serializable private boolean enabled = true; +private String confirmMessage; + public ActionLink() { } @@ -162,5 +164,14 @@ public abstract class ActionLink implements Serializable public boolean isIndicatorEnabled() { return true; } + +public String getConfirmMessage() { +return confirmMessage; +} + +public ActionLink confirmMessage(final String confirmMessage) { +this.confirmMessage = confirmMessage; +return this; +} } diff --git a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel.java b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel.java index 43442db..09250bb 100644 --- a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel.java +++ b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel.java @@ -96,7 +96,11 @@ public final class ActionPanel extends Panel { enabled = action.getLink().isEnabled(obj); actionLink = action.isOnConfirm() -? new IndicatingOnConfirmAjaxLink(Constants.ACTION, enabled) { +? new IndicatingOnConfirmAjaxLink( +Constants.ACTION, + StringUtils.isNotBlank(action.getLink().getConfirmMessage()) +? action.getLink().getConfirmMessage() +: Constants.CONFIRM_DELETE, enabled) { private static final long serialVersionUID = -7978723352517770644L;
[syncope] branch 2_1_X updated: [SYNCOPE-1633] Confirm dialog custom message
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 2_1_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/2_1_X by this push: new 5d45175 [SYNCOPE-1633] Confirm dialog custom message 5d45175 is described below commit 5d451759a2224b8d6fb608d62814e59b1a41ec5f Author: Marco Di Sabatino Di Diodoro AuthorDate: Tue May 18 11:28:37 2021 +0200 [SYNCOPE-1633] Confirm dialog custom message --- .../org/apache/syncope/client/console/commons/Constants.java | 2 ++ .../client/console/wicket/markup/html/form/ActionLink.java| 11 +++ .../client/console/wicket/markup/html/form/ActionPanel.java | 6 +- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java index 1b46767..69579df 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java @@ -80,6 +80,8 @@ public final class Constants { public static final String OUTER = "outer"; public static final String ACTION = "action"; + +public static final String CONFIRM_DELETE = "confirmDelete"; public static final String BEFORE_LOGOUT_PAGE = "beforeLogoutPage"; diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLink.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLink.java index 306bbf3..3854929 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLink.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionLink.java @@ -33,6 +33,8 @@ public abstract class ActionLink implements Serializable private boolean enabled = true; +private String confirmMessage; + public ActionLink() { } @@ -160,4 +162,13 @@ public abstract class ActionLink implements Serializable public boolean isIndicatorEnabled() { return true; } + +public String getConfirmMessage() { +return confirmMessage; +} + +public ActionLink confirmMessage(final String confirmMessage) { +this.confirmMessage = confirmMessage; +return this; +} } diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel.java index e58789c..933bff2 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel.java @@ -96,7 +96,11 @@ public final class ActionPanel extends Panel { enabled = action.getLink().isEnabled(obj); actionLink = action.isOnConfirm() -? new IndicatingOnConfirmAjaxLink(Constants.ACTION, enabled) { +? new IndicatingOnConfirmAjaxLink( +Constants.ACTION, + StringUtils.isNotBlank(action.getLink().getConfirmMessage()) +? action.getLink().getConfirmMessage() +: Constants.CONFIRM_DELETE, enabled) { private static final long serialVersionUID = -7978723352517770644L;
[syncope] branch master updated: [SYNCOPE-1619] Boolean fix
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/master by this push: new 0628030 [SYNCOPE-1619] Boolean fix 0628030 is described below commit 062803068e88ac7838c4b1bc7c0de84c09184fde Author: Marco Di Sabatino Di Diodoro AuthorDate: Sat Feb 27 16:03:01 2021 +0100 [SYNCOPE-1619] Boolean fix --- .../java/org/apache/syncope/common/lib/types/AttrSchemaType.java| 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/types/AttrSchemaType.java b/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/types/AttrSchemaType.java index cf93418..51acaed 100644 --- a/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/types/AttrSchemaType.java +++ b/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/types/AttrSchemaType.java @@ -49,8 +49,10 @@ public enum AttrSchemaType { } public static AttrSchemaType getAttrSchemaTypeByClass(final Class type) { -return Stream.of(AttrSchemaType.values()) -.filter(item -> type == item.getType()).findFirst().orElse(AttrSchemaType.String); +return type == boolean.class +? AttrSchemaType.Boolean +: Stream.of(AttrSchemaType.values()).filter(item -> type == item.getType()). +findFirst().orElse(AttrSchemaType.String); } }
[syncope] branch 2_1_X updated: [SYNCOPE-1619] Boolean fix
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 2_1_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/2_1_X by this push: new 6b82d14 [SYNCOPE-1619] Boolean fix 6b82d14 is described below commit 6b82d14c3ce727c3327153d558ff4e46ab36b102 Author: Marco Di Sabatino Di Diodoro AuthorDate: Sat Feb 27 16:03:01 2021 +0100 [SYNCOPE-1619] Boolean fix --- .../java/org/apache/syncope/common/lib/types/AttrSchemaType.java| 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/AttrSchemaType.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/AttrSchemaType.java index 9db2da0..a6284b8 100644 --- a/common/lib/src/main/java/org/apache/syncope/common/lib/types/AttrSchemaType.java +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/AttrSchemaType.java @@ -51,7 +51,9 @@ public enum AttrSchemaType { } public static AttrSchemaType getAttrSchemaTypeByClass(final Class type) { -return Stream.of(AttrSchemaType.values()) -.filter(item -> type == item.getType()).findFirst().orElse(AttrSchemaType.String); +return type == boolean.class +? AttrSchemaType.Boolean +: Stream.of(AttrSchemaType.values()).filter(item -> type == item.getType()). +findFirst().orElse(AttrSchemaType.String); } }
[syncope] branch 2_1_X updated: Added getter VirAttrCacheKey
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 2_1_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/2_1_X by this push: new d31f65f Added getter VirAttrCacheKey d31f65f is described below commit d31f65f9a6e3c5a4ab8e7b82c5ac2a38a1ba2ecc Author: Marco Di Sabatino Di Diodoro AuthorDate: Fri Feb 26 17:27:01 2021 +0100 Added getter VirAttrCacheKey --- .../syncope/core/provisioning/api/cache/VirAttrCacheKey.java | 12 1 file changed, 12 insertions(+) diff --git a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/cache/VirAttrCacheKey.java b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/cache/VirAttrCacheKey.java index dce8898..91c16b8 100644 --- a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/cache/VirAttrCacheKey.java +++ b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/cache/VirAttrCacheKey.java @@ -48,6 +48,18 @@ public class VirAttrCacheKey { this.schema = schema; } +public String getAnyType() { +return anyType; +} + +public String getAny() { +return any; +} + +public String getSchema() { +return schema; +} + @Override public int hashCode() { return new HashCodeBuilder().
[syncope] branch master updated: Added getter VirAttrCacheKey
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/master by this push: new 31810c1 Added getter VirAttrCacheKey 31810c1 is described below commit 31810c1eb67d413505f342d50b8c756670965db9 Author: Marco Di Sabatino Di Diodoro AuthorDate: Fri Feb 26 17:27:01 2021 +0100 Added getter VirAttrCacheKey --- .../syncope/core/provisioning/api/cache/VirAttrCacheKey.java | 12 1 file changed, 12 insertions(+) diff --git a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/cache/VirAttrCacheKey.java b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/cache/VirAttrCacheKey.java index dce8898..91c16b8 100644 --- a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/cache/VirAttrCacheKey.java +++ b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/cache/VirAttrCacheKey.java @@ -48,6 +48,18 @@ public class VirAttrCacheKey { this.schema = schema; } +public String getAnyType() { +return anyType; +} + +public String getAny() { +return any; +} + +public String getSchema() { +return schema; +} + @Override public int hashCode() { return new HashCodeBuilder().
[syncope] branch master updated: [SYNCOPE-1619] SearchPanel improvement (#243)
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/master by this push: new 7326c25 [SYNCOPE-1619] SearchPanel improvement (#243) 7326c25 is described below commit 7326c254f1e3ed1519ccdb7a1e5f26fe23d28d7d Author: mdisabatino AuthorDate: Fri Feb 26 14:29:31 2021 +0100 [SYNCOPE-1619] SearchPanel improvement (#243) --- .../panels/search/ConnObjectSearchPanel.java | 9 +- .../META-INF/resources/ui-commons/css/search.scss | 12 +- .../panels/DisplayAttributesModalPanel.java| 4 +- .../console/panels/search/AbstractSearchPanel.java | 15 +- .../console/panels/search/SearchClausePanel.java | 197 ++--- .../client/console/panels/search/SearchUtils.java | 8 +- .../common/lib/search/SearchableFields.java| 19 +- .../syncope/common/lib/types/AttrSchemaType.java | 7 + 8 files changed, 219 insertions(+), 52 deletions(-) diff --git a/client/idm/console/src/main/java/org/apache/syncope/client/console/panels/search/ConnObjectSearchPanel.java b/client/idm/console/src/main/java/org/apache/syncope/client/console/panels/search/ConnObjectSearchPanel.java index 833baf1..b078a40 100644 --- a/client/idm/console/src/main/java/org/apache/syncope/client/console/panels/search/ConnObjectSearchPanel.java +++ b/client/idm/console/src/main/java/org/apache/syncope/client/console/panels/search/ConnObjectSearchPanel.java @@ -18,6 +18,7 @@ */ package org.apache.syncope.client.console.panels.search; +import java.util.Collections; import java.util.List; import java.util.Map; import java.util.function.Function; @@ -84,17 +85,17 @@ public class ConnObjectSearchPanel extends AbstractSearchPanel { @Override protected List load() { -return List.of(SearchClause.Type.ATTRIBUTE); +return Collections.singletonList(SearchClause.Type.ATTRIBUTE); } }; -this.dnames = new LoadableDetachableModel>() { +this.dnames = new LoadableDetachableModel>() { private static final long serialVersionUID = 2989042618372L; @Override -protected List load() { -return List.of(); +protected Map load() { +return Collections.emptyMap(); } }; diff --git a/client/idrepo/common-ui/src/main/resources/META-INF/resources/ui-commons/css/search.scss b/client/idrepo/common-ui/src/main/resources/META-INF/resources/ui-commons/css/search.scss index 453f5c7..493c7f4 100644 --- a/client/idrepo/common-ui/src/main/resources/META-INF/resources/ui-commons/css/search.scss +++ b/client/idrepo/common-ui/src/main/resources/META-INF/resources/ui-commons/css/search.scss @@ -31,7 +31,7 @@ } } .field { -line-height: 34px; +line-height: 30px; float: left; padding: 0 3px 0px 0px; display: inline-block !important; @@ -63,7 +63,7 @@ } } .value { -width: 250px; +width: 320px; } .date { width: 160px; @@ -93,3 +93,11 @@ .custom-autocomplete-box li.selected { background-color: #eee; } + +.search-spinner { + line-height: 23px !important; +} + +.search-spinner span{ + width: 70% !important; +} diff --git a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/DisplayAttributesModalPanel.java b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/DisplayAttributesModalPanel.java index 19d95fe..78f611b 100644 --- a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/DisplayAttributesModalPanel.java +++ b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/DisplayAttributesModalPanel.java @@ -23,6 +23,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; import org.apache.syncope.client.console.PreferenceManager; import org.apache.syncope.client.console.SyncopeConsoleSession; import org.apache.syncope.client.ui.commons.Constants; @@ -75,7 +76,8 @@ public abstract class DisplayAttributesModalPanel extend super(modal, pageRef); this.type = type; -final List detailslList = SearchableFields.get(DisplayAttributesModalPanel.getTOClass(type)); +final List detailslList = SearchableFields.get(DisplayAttributesModalPanel.getTOClass(type)) +.keySet().stream().collect(Collectors.toList()); Collections.sort(detailslList); Collections.sort(pSchemaNames); Collections.sort(dSchemaNames); diff --git a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/search/AbstractSearchPanel.java b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/search/AbstractSearchPane
[syncope] branch 2_1_X updated: [SYNCOPE-1619] SearchPanel improvement (#243)
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 2_1_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/2_1_X by this push: new 0765c05 [SYNCOPE-1619] SearchPanel improvement (#243) 0765c05 is described below commit 0765c050e767c7361c66cb295de4c2d6979c23fe Author: mdisabatino AuthorDate: Fri Feb 26 14:29:31 2021 +0100 [SYNCOPE-1619] SearchPanel improvement (#243) --- .../panels/DisplayAttributesModalPanel.java| 4 +- .../console/panels/search/AbstractSearchPanel.java | 15 +- .../panels/search/ConnObjectSearchPanel.java | 6 +- .../console/panels/search/SearchClausePanel.java | 195 ++--- .../client/console/panels/search/SearchUtils.java | 2 +- .../META-INF/resources/css/syncopeConsole.css | 8 +- .../common/lib/search/SearchableFields.java| 19 +- .../syncope/common/lib/types/AttrSchemaType.java | 6 + 8 files changed, 207 insertions(+), 48 deletions(-) diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/DisplayAttributesModalPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/DisplayAttributesModalPanel.java index 4c5d40f..562a4f3 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/DisplayAttributesModalPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/DisplayAttributesModalPanel.java @@ -23,6 +23,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; import org.apache.syncope.client.console.PreferenceManager; import org.apache.syncope.client.console.SyncopeConsoleSession; import org.apache.syncope.client.console.commons.Constants; @@ -77,7 +78,8 @@ public abstract class DisplayAttributesModalPanel extend super(modal, pageRef); this.type = type; -final List detailslList = SearchableFields.get(DisplayAttributesModalPanel.getTOClass(type)); +final List detailslList = SearchableFields.get(DisplayAttributesModalPanel.getTOClass(type)) +.keySet().stream().collect(Collectors.toList()); Collections.sort(detailslList); Collections.sort(pSchemaNames); Collections.sort(dSchemaNames); diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AbstractSearchPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AbstractSearchPanel.java index 604f4cb..6364e0c 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AbstractSearchPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AbstractSearchPanel.java @@ -19,6 +19,7 @@ package org.apache.syncope.client.console.panels.search; import java.io.Serializable; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -56,7 +57,7 @@ public abstract class AbstractSearchPanel extends Panel { protected ResourceRestClient resourceRestClient = new ResourceRestClient(); -protected IModel> dnames; +protected IModel> dnames; protected IModel> anames; @@ -188,13 +189,19 @@ public abstract class AbstractSearchPanel extends Panel { } protected void populate() { -dnames = new LoadableDetachableModel>() { +dnames = new LoadableDetachableModel>() { private static final long serialVersionUID = 5275935387613157437L; @Override -protected List load() { -return SearchableFields.get(typeKind.getTOClass()); +protected Map load() { +Map dSchemaNames = new HashMap<>(); +SearchableFields.get(typeKind.getTOClass()).forEach((key, type) -> { +PlainSchemaTO plain = new PlainSchemaTO(); +plain.setType(type); +dSchemaNames.put(key, plain); +}); +return dSchemaNames; } }; diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/search/ConnObjectSearchPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/search/ConnObjectSearchPanel.java index 47bccc9..b078a40 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/search/ConnObjectSearchPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/search/ConnObjectSearchPanel.java @@ -89,13 +89,13 @@ public class ConnObjectSearchPanel extends AbstractSearchPanel { } }; -this.dnames = new LoadableDetachableModel>() { +this.dnames = new LoadableDetachableModel>() {
[syncope] branch SYNCOPE-1619 updated (38260ce -> 935fc51)
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a change to branch SYNCOPE-1619 in repository https://gitbox.apache.org/repos/asf/syncope.git. from 38260ce [SYNCOPE-1619] SearchPanel improvement add 935fc51 [SYNCOPE-1619] Style fix No new revisions were added by this update. Summary of changes: .../java/org/apache/syncope/client/console/panels/AnyPanel.java| 2 +- .../syncope/client/console/panels/search/AbstractSearchPanel.java | 7 +++ 2 files changed, 4 insertions(+), 5 deletions(-)
[syncope] 01/01: [SYNCOPE-1619] SearchPanel improvement
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch SYNCOPE-1619 in repository https://gitbox.apache.org/repos/asf/syncope.git commit 38260ced335b1b05a7fb42042d557f68ed68d3de Author: Marco Di Sabatino Di Diodoro AuthorDate: Fri Feb 26 13:05:06 2021 +0100 [SYNCOPE-1619] SearchPanel improvement --- .../syncope/client/console/panels/AnyPanel.java| 2 +- .../panels/DisplayAttributesModalPanel.java| 4 +- .../console/panels/search/AbstractSearchPanel.java | 16 +- .../panels/search/ConnObjectSearchPanel.java | 6 +- .../console/panels/search/SearchClausePanel.java | 195 ++--- .../client/console/panels/search/SearchUtils.java | 2 +- .../META-INF/resources/css/syncopeConsole.css | 8 +- .../common/lib/search/SearchableFields.java| 19 +- .../syncope/common/lib/types/AttrSchemaType.java | 6 + 9 files changed, 209 insertions(+), 49 deletions(-) diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyPanel.java index ead2159..88e553d 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyPanel.java @@ -269,7 +269,7 @@ public class AnyPanel extends Panel implements ModalPanel { case USER: UserDirectoryPanel.class.cast(AnyPanel.this.directoryPanel).search( precond + SearchUtils.buildFIQL( - AnyPanel.this.searchPanel.getModel().getObject(), + AnyPanel.this.searchPanel.getModel().getObject(), SyncopeClient.getUserSearchConditionBuilder(), AnyPanel.this.searchPanel.getAvailableSchemaTypes(), SearchUtils.NO_CUSTOM_CONDITION), diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/DisplayAttributesModalPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/DisplayAttributesModalPanel.java index 4c5d40f..562a4f3 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/DisplayAttributesModalPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/DisplayAttributesModalPanel.java @@ -23,6 +23,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; import org.apache.syncope.client.console.PreferenceManager; import org.apache.syncope.client.console.SyncopeConsoleSession; import org.apache.syncope.client.console.commons.Constants; @@ -77,7 +78,8 @@ public abstract class DisplayAttributesModalPanel extend super(modal, pageRef); this.type = type; -final List detailslList = SearchableFields.get(DisplayAttributesModalPanel.getTOClass(type)); +final List detailslList = SearchableFields.get(DisplayAttributesModalPanel.getTOClass(type)) +.keySet().stream().collect(Collectors.toList()); Collections.sort(detailslList); Collections.sort(pSchemaNames); Collections.sort(dSchemaNames); diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AbstractSearchPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AbstractSearchPanel.java index 604f4cb..191e0b3 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AbstractSearchPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AbstractSearchPanel.java @@ -19,6 +19,7 @@ package org.apache.syncope.client.console.panels.search; import java.io.Serializable; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -56,7 +57,7 @@ public abstract class AbstractSearchPanel extends Panel { protected ResourceRestClient resourceRestClient = new ResourceRestClient(); -protected IModel> dnames; +protected IModel> dnames; protected IModel> anames; @@ -188,13 +189,20 @@ public abstract class AbstractSearchPanel extends Panel { } protected void populate() { -dnames = new LoadableDetachableModel>() { +dnames = new LoadableDetachableModel>() { private static final long serialVersionUID = 5275935387613157437L; @Override -protected List load() { -return SearchableFields.get(typeKind.getTOClass()); +protected Map load() { +Map dSchemaNames = new HashMap<>(); +SearchableFields.get(typeKind.getTOClass()). +
[syncope] branch SYNCOPE-1619 created (now 38260ce)
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a change to branch SYNCOPE-1619 in repository https://gitbox.apache.org/repos/asf/syncope.git. at 38260ce [SYNCOPE-1619] SearchPanel improvement This branch includes the following new commits: new 38260ce [SYNCOPE-1619] SearchPanel improvement The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[syncope] branch master updated: [SYNCOPE-1606] Fix user toggle panel
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/master by this push: new 1509416 [SYNCOPE-1606] Fix user toggle panel 1509416 is described below commit 15094166cffac64ab1f1609a83569f8fba6f6f40 Author: Marco Di Sabatino Di Diodoro AuthorDate: Tue Dec 22 16:55:08 2020 +0100 [SYNCOPE-1606] Fix user toggle panel --- .../syncope/client/console/panels/UserDirectoryPanel.java| 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/UserDirectoryPanel.java b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/UserDirectoryPanel.java index fcce6d5..6b97bce 100644 --- a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/UserDirectoryPanel.java +++ b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/UserDirectoryPanel.java @@ -81,7 +81,7 @@ public class UserDirectoryPanel extends AnyDirectoryPanel> formModel = new CompoundPropertyModel<>( new AnyWrapper<>(model.getObject())); displayAttributeModal.setFormModel(formModel); @@ -223,7 +225,7 @@ public class UserDirectoryPanel extends AnyDirectoryPanel(new AnyWrapper<>(model.getObject(, this, pageRef).forEach(panel::add); @@ -255,10 +257,10 @@ public class UserDirectoryPanel extends AnyDirectoryPanel() { +if (wizardInModal) { +panel.add(new ActionLink() { private static final long serialVersionUID = -1978723352517770644L;
[syncope] branch 2_1_X updated: [SYNCOPE-1606] Fix user toggle panel
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 2_1_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/2_1_X by this push: new d99f242 [SYNCOPE-1606] Fix user toggle panel d99f242 is described below commit d99f24226bb7027b851c666d63fb4fb81b81ee2f Author: Marco Di Sabatino Di Diodoro AuthorDate: Tue Dec 22 16:55:08 2020 +0100 [SYNCOPE-1606] Fix user toggle panel --- .../client/console/panels/UserDirectoryPanel.java | 118 +++-- 1 file changed, 60 insertions(+), 58 deletions(-) diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/UserDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/UserDirectoryPanel.java index 8c30d8a..41657ec 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/UserDirectoryPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/UserDirectoryPanel.java @@ -182,6 +182,7 @@ public class UserDirectoryPanel extends AnyDirectoryPanel> formModel = new CompoundPropertyModel<>( new AnyWrapper<>(model.getObject())); displayAttributeModal.setFormModel(formModel); @@ -347,78 +349,78 @@ public class UserDirectoryPanel extends AnyDirectoryPanel() { private static final long serialVersionUID = 8011039414597736111L; - + @Override public void onClick(final AjaxRequestTarget target, final UserTO ignore) { model.setObject(UserRestClient.class.cast(restClient).read(model.getObject().getKey())); MergeLinkedAccountsWizardBuilder builder = - new MergeLinkedAccountsWizardBuilder(model, pageRef, UserDirectoryPanel.this, modal); +new MergeLinkedAccountsWizardBuilder(model, pageRef, UserDirectoryPanel.this, modal); builder.setEventSink(builder); target.add(modal.setContent(builder.build(BaseModal.CONTENT_ID, AjaxWizard.Mode.CREATE))); modal.header(new StringResourceModel("mergeLinkedAccounts.title", model)); modal.show(true); } -}, ActionType.MERGE_ACCOUNTS, -String.format("%s,%s,%s,%s", StandardEntitlement.USER_READ, StandardEntitlement.USER_UPDATE, -StandardEntitlement.USER_DELETE, StandardEntitlement.RESOURCE_GET_CONNOBJECT)); +}, ActionType.MERGE_ACCOUNTS, +String.format("%s,%s,%s,%s", StandardEntitlement.USER_READ, StandardEntitlement.USER_UPDATE, +StandardEntitlement.USER_DELETE, StandardEntitlement.RESOURCE_GET_CONNOBJECT)); } } if (wizardInModal) { panel.add(new ActionLink() { - private static final long serialVersionUID = -1978723352517770644L; - - @Override - public void onClick(final AjaxRequestTarget target, final UserTO ignore) { - model.setObject(restClient.read(model.getObject().getKey())); - target.add(altDefaultModal.setContent(new AuditHistoryModal( - altDefaultModal, - AuditElements.EventCategoryType.LOGIC, - "UserLogic", - model.getObject(), - StandardEntitlement.USER_UPDATE, - pageRef) { - - private static final long serialVersionUID = 959378158400669867L; - - @Override - protected void restore(final String json, final AjaxRequestTarget target) { - // The original audit record masks the password and the security - // answer; so we cannot use the audit record to resurrect the entry - // based on mask data. - // - // The method behavior below will reset the audit record such - // that the current security answer and the password for the object - // are always maintained, and such properties for the - // user cannot be restored using audit records. - UserTO original = model.getObject(); - try { - UserTO updated = MAPPER.readValue(json, UserTO.class); - UserPatch userPatch = AnyOperations.diff(updated, original, false); -
[syncope] branch master updated: [SYNCOPE-1600] fix
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/master by this push: new 7dc48cc [SYNCOPE-1600] fix 7dc48cc is described below commit 7dc48cc6cc7cf13137a1ee1582ca09b12ade4f48 Author: Marco Di Sabatino Di Diodoro AuthorDate: Fri Nov 13 17:01:03 2020 +0100 [SYNCOPE-1600] fix --- .../apache/syncope/core/flowable/impl/FlowableUserRequestHandler.java | 4 1 file changed, 4 insertions(+) diff --git a/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/impl/FlowableUserRequestHandler.java b/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/impl/FlowableUserRequestHandler.java index 5cbbf91..d9a23c0 100644 --- a/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/impl/FlowableUserRequestHandler.java +++ b/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/impl/FlowableUserRequestHandler.java @@ -290,6 +290,10 @@ public class FlowableUserRequestHandler implements UserRequestHandler { case "dropdown": result = UserRequestFormPropertyType.Dropdown; break; + +case "password": +result = UserRequestFormPropertyType.Password; +break; case "string": default:
[syncope] branch 2_1_X updated: [SYNCOPE-1600] fix
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 2_1_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/2_1_X by this push: new ccd4331 [SYNCOPE-1600] fix ccd4331 is described below commit ccd4331cb8a9f32519cf982d41174c7fcde04b04 Author: Marco Di Sabatino Di Diodoro AuthorDate: Fri Nov 13 17:01:03 2020 +0100 [SYNCOPE-1600] fix --- .../apache/syncope/core/flowable/impl/FlowableUserRequestHandler.java | 4 1 file changed, 4 insertions(+) diff --git a/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/impl/FlowableUserRequestHandler.java b/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/impl/FlowableUserRequestHandler.java index f176f5f..2b267ab 100644 --- a/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/impl/FlowableUserRequestHandler.java +++ b/ext/flowable/flowable-bpmn/src/main/java/org/apache/syncope/core/flowable/impl/FlowableUserRequestHandler.java @@ -295,6 +295,10 @@ public class FlowableUserRequestHandler implements UserRequestHandler { case "dropdown": result = UserRequestFormPropertyType.Dropdown; break; + +case "password": +result = UserRequestFormPropertyType.Password; +break; case "string": default:
[syncope] branch master updated: Fix confirm password reset
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/master by this push: new bccf471 Fix confirm password reset bccf471 is described below commit bccf47121c6e74e2700abb39fb5dd512dc4d1711 Author: Marco Di Sabatino Di Diodoro AuthorDate: Tue Aug 18 12:37:02 2020 +0200 Fix confirm password reset --- .../apache/syncope/client/enduser/pages/SelfConfirmPasswordReset.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/pages/SelfConfirmPasswordReset.java b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/pages/SelfConfirmPasswordReset.java index 0051526..ba1e6f5 100644 --- a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/pages/SelfConfirmPasswordReset.java +++ b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/pages/SelfConfirmPasswordReset.java @@ -68,7 +68,7 @@ public class SelfConfirmPasswordReset extends BaseEnduserWebPage { public SelfConfirmPasswordReset(final PageParameters parameters) { super(parameters); -if (parameters != null || parameters.get("token").isEmpty()) { +if (parameters == null || parameters.get("token").isEmpty()) { LOG.debug("No token parameter found in the request url"); parameters.add("errorMessage", getString("self.confirm.pwd.reset.error.empty")); setResponsePage(getApplication().getHomePage(), parameters);
[syncope] branch 2_1_X updated: [SYNCOPE-1521] get visible realms
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 2_1_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/2_1_X by this push: new bbc2375 [SYNCOPE-1521] get visible realms bbc2375 is described below commit bbc237592638ca22b94fc0cb3b2a345bcc57ff43 Author: Marco Di Sabatino Di Diodoro AuthorDate: Mon Apr 20 20:17:03 2020 +0200 [SYNCOPE-1521] get visible realms --- .../syncope/client/console/SyncopeConsoleSession.java | 8 .../syncope/client/console/commons/RealmsUtils.java | 19 +-- .../client/console/panels/RealmChoicePanel.java | 2 +- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java index 9c9bdd7..ba96490 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java @@ -283,15 +283,15 @@ public class SyncopeConsoleSession extends AuthenticatedWebSession { return auth.values().stream().flatMap(Set::stream).distinct().sorted().collect(Collectors.toList()); } -public Set getVisibleRealms() { +public List getVisibleRealms() { Set roots = auth.get(StandardEntitlement.REALM_LIST); return roots.isEmpty() -? Collections.emptySet() -: roots.stream().sorted().collect(Collectors.toSet()); +? Collections.emptyList() +: roots.stream().sorted().collect(Collectors.toList()); } public Optional getRootRealm() { -Set roots = getVisibleRealms(); +List roots = getVisibleRealms(); if (roots.isEmpty()) { return Optional.empty(); } diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/RealmsUtils.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/RealmsUtils.java index 64b091f..7a8f157 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/commons/RealmsUtils.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/RealmsUtils.java @@ -18,6 +18,7 @@ */ package org.apache.syncope.client.console.commons; +import java.util.List; import org.apache.commons.lang3.StringUtils; import org.apache.syncope.client.console.SyncopeConsoleSession; import org.apache.syncope.client.console.rest.RealmRestClient; @@ -33,12 +34,18 @@ public final class RealmsUtils { } public static boolean isSearchEnabled() { -return new RealmRestClient().search( -new RealmQuery.Builder().keyword( - SyncopeConsoleSession.get().getAuthRealms().contains(SyncopeConstants.ROOT_REALM) -? SyncopeConstants.ROOT_REALM -: SyncopeConsoleSession.get().getAuthRealms().get(0)).build()). -getTotalCount() > REALMS_VIEW_SIZE; +return isSearchEnabled(SyncopeConsoleSession.get().getAuthRealms()); +} + +public static boolean isSearchEnabled(final List realms) { +return realms.isEmpty() +? false +: new RealmRestClient().search( +new RealmQuery.Builder().keyword( +realms.contains(SyncopeConstants.ROOT_REALM) +? SyncopeConstants.ROOT_REALM +: realms.get(0)).build()). +getTotalCount() > REALMS_VIEW_SIZE; } public static boolean checkInput(final String input) { diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmChoicePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmChoicePanel.java index 5d38105..807d226 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmChoicePanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmChoicePanel.java @@ -102,7 +102,7 @@ public class RealmChoicePanel extends Panel { this.pageRef = pageRef; availableRealms = SyncopeConsoleSession.get().getVisibleRealms(); tree = new HashMap<>(); -isSearchEnabled = RealmsUtils.isSearchEnabled(); +isSearchEnabled = RealmsUtils.isSearchEnabled(SyncopeConsoleSession.get().getVisibleRealms()); realmTree = new LoadableDetachableModel>>() {
[syncope] branch 2_1_X updated: [SYNCOPE-1521] Fix RealmChoicePanel
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 2_1_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/2_1_X by this push: new b3308f4 [SYNCOPE-1521] Fix RealmChoicePanel b3308f4 is described below commit b3308f4e0b3f888745a52206cae727e3701ddb37 Author: Marco Di Sabatino Di Diodoro AuthorDate: Mon Apr 20 19:04:06 2020 +0200 [SYNCOPE-1521] Fix RealmChoicePanel --- .../syncope/client/console/SyncopeConsoleSession.java | 16 .../syncope/client/console/panels/AnyPanel.java | 3 ++- .../apache/syncope/client/console/panels/Realm.java | 3 ++- .../client/console/panels/RealmChoicePanel.java | 19 +-- 4 files changed, 33 insertions(+), 8 deletions(-) diff --git a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java index 72da875..9c9bdd7 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Optional; import java.util.Set; import java.util.concurrent.Callable; import java.util.concurrent.CompletableFuture; @@ -282,6 +283,21 @@ public class SyncopeConsoleSession extends AuthenticatedWebSession { return auth.values().stream().flatMap(Set::stream).distinct().sorted().collect(Collectors.toList()); } +public Set getVisibleRealms() { +Set roots = auth.get(StandardEntitlement.REALM_LIST); +return roots.isEmpty() +? Collections.emptySet() +: roots.stream().sorted().collect(Collectors.toSet()); +} + +public Optional getRootRealm() { +Set roots = getVisibleRealms(); +if (roots.isEmpty()) { +return Optional.empty(); +} +return roots.stream().findFirst(); +} + public boolean owns(final String entitlements, final String... realms) { if (StringUtils.isEmpty(entitlements)) { return true; diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyPanel.java index bb62175..7e62958 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnyPanel.java @@ -89,7 +89,8 @@ public class AnyPanel extends Panel implements ModalPanel { final String realm; final String dynRealm; -if (realmTO.getFullPath().startsWith(SyncopeConstants.ROOT_REALM)) { +if (StringUtils.isNotBlank(realmTO.getFullPath()) +&& realmTO.getFullPath().startsWith(SyncopeConstants.ROOT_REALM)) { realm = realmTO.getFullPath(); dynRealm = null; } else { diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/Realm.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/Realm.java index 6d692fd..f2adcca 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/Realm.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/Realm.java @@ -108,7 +108,8 @@ public abstract class Realm extends WizardMgtPanel { public Panel getPanel(final String panelId) { final ActionsPanel actionPanel = new ActionsPanel<>("actions", null); -if (realmTO.getFullPath().startsWith(SyncopeConstants.ROOT_REALM)) { +if (StringUtils.isNotBlank(realmTO.getFullPath()) +&& realmTO.getFullPath().startsWith(SyncopeConstants.ROOT_REALM)) { actionPanel.add(new ActionLink(realmTO) { diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmChoicePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmChoicePanel.java index 4d9b945..5d38105 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmChoicePanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmChoicePanel.java @@ -33,6 +33,7 @@ import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Optional; import java.util.stream.Collectors; import java.util.stream.Stream; import org.apache.commons.lang3.StringUtils; @@ -47,7 +48,6 @@ import org.apache.syncope.comm
[syncope] branch master updated: Fix CSS palette scrollbar
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/master by this push: new 837f942 Fix CSS palette scrollbar 837f942 is described below commit 837f942cd430756edf25b294d6c0fcdfd1b2bae9 Author: Marco Di Sabatino Di Diodoro AuthorDate: Wed Apr 15 16:52:45 2020 +0200 Fix CSS palette scrollbar --- .../META-INF/resources/ui-commons/css/syncopeUI.scss| 13 + 1 file changed, 13 insertions(+) diff --git a/client/idrepo/common-ui/src/main/resources/META-INF/resources/ui-commons/css/syncopeUI.scss b/client/idrepo/common-ui/src/main/resources/META-INF/resources/ui-commons/css/syncopeUI.scss index dc36abb..b6ed67d 100644 --- a/client/idrepo/common-ui/src/main/resources/META-INF/resources/ui-commons/css/syncopeUI.scss +++ b/client/idrepo/common-ui/src/main/resources/META-INF/resources/ui-commons/css/syncopeUI.scss @@ -1112,6 +1112,19 @@ div#tablehandling ul.menu li a { color: #28a745; } +.palette-scrollbar { + min-width: 100%; + overflow: scroll; +} + +@-moz-document url-prefix(''){ + .palette-scrollbar { +min-width: 100%; +width: auto; +overflow: scroll; + } +} + /* Form wrappers = */
[syncope] branch master updated: Fix CSS palette scrollbar
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/master by this push: new 8090c92 Fix CSS palette scrollbar 8090c92 is described below commit 8090c92e470d64b07697f844740d774d0c588348 Author: Marco Di Sabatino Di Diodoro AuthorDate: Wed Apr 15 16:30:21 2020 +0200 Fix CSS palette scrollbar --- .../client/ui/commons/markup/html/form/NonI18nPalette.html| 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/idrepo/common-ui/src/main/resources/org/apache/syncope/client/ui/commons/markup/html/form/NonI18nPalette.html b/client/idrepo/common-ui/src/main/resources/org/apache/syncope/client/ui/commons/markup/html/form/NonI18nPalette.html index 5c9302b..046915c 100644 --- a/client/idrepo/common-ui/src/main/resources/org/apache/syncope/client/ui/commons/markup/html/form/NonI18nPalette.html +++ b/client/idrepo/common-ui/src/main/resources/org/apache/syncope/client/ui/commons/markup/html/form/NonI18nPalette.html @@ -18,11 +18,11 @@ - + [available header] -[choices] +[choices] @@ -46,11 +46,11 @@ - + [selected header] -[selection] +[selection]
[syncope] branch 2_1_X updated: Fix CSS palette scrollbar
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 2_1_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/2_1_X by this push: new 1b13596 Fix CSS palette scrollbar 1b13596 is described below commit 1b13596775291f50923979dea2c489c61e647130 Author: Marco Di Sabatino Di Diodoro AuthorDate: Wed Apr 15 16:30:21 2020 +0200 Fix CSS palette scrollbar --- .../resources/META-INF/resources/css/syncopeConsole.css| 14 ++ .../console/wicket/markup/html/form/NonI18nPalette.html| 8 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css b/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css index 691e82d..189f88f 100644 --- a/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css +++ b/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css @@ -1175,3 +1175,17 @@ div#tablehandling ul.menu li a { .realm-choice #realm-choice-folder { color: #3c8dbc; } + +.palette-scrollbar { + min-width: 100%; + overflow: scroll; +} + +@-moz-document url-prefix(''){ + .palette-scrollbar { +min-width: 100%; +width: auto; +overflow: scroll; + } +} + diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/NonI18nPalette.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/NonI18nPalette.html index de21826..4b245fa 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/NonI18nPalette.html +++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/NonI18nPalette.html @@ -18,11 +18,11 @@ - + [available header] -[choices] +[choices] @@ -46,11 +46,11 @@ - + [selected header] -[selection] +[selection]
[syncope] branch 2_0_X updated: Fix CSS palette scrollbar
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 2_0_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/2_0_X by this push: new 1c41887 Fix CSS palette scrollbar 1c41887 is described below commit 1c418871fce6ce1be964876f9b5f05830d6ffe24 Author: Marco Di Sabatino Di Diodoro AuthorDate: Wed Apr 15 16:30:21 2020 +0200 Fix CSS palette scrollbar --- .../resources/META-INF/resources/css/syncopeConsole.css| 14 ++ .../console/wicket/markup/html/form/NonI18nPalette.html| 8 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css b/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css index c2dcf2c..3442821 100644 --- a/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css +++ b/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css @@ -1162,3 +1162,17 @@ div#inline-actions ul.menu i, div#tablehandling ul.menu i { div#tablehandling ul.menu li a { padding: 0px !important; } + +.palette-scrollbar { + min-width: 100%; + overflow: scroll; +} + +@-moz-document url-prefix(''){ + .palette-scrollbar { +min-width: 100%; +width: auto; +overflow: scroll; + } +} + diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/NonI18nPalette.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/NonI18nPalette.html index de21826..4b245fa 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/NonI18nPalette.html +++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/NonI18nPalette.html @@ -18,11 +18,11 @@ - + [available header] -[choices] +[choices] @@ -46,11 +46,11 @@ - + [selected header] -[selection] +[selection]
[syncope] branch master updated: Exclude notification task from content exporter
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/master by this push: new c0dd6f6 Exclude notification task from content exporter c0dd6f6 is described below commit c0dd6f6e00329ce25258dfe760f1a7ffb8c78437 Author: Marco Di Sabatino Di Diodoro AuthorDate: Fri Apr 10 15:53:48 2020 +0200 Exclude notification task from content exporter --- .../syncope/core/persistence/jpa/content/XMLContentExporter.java | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/content/XMLContentExporter.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/content/XMLContentExporter.java index 6ac5c06..ac8dbf5 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/content/XMLContentExporter.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/content/XMLContentExporter.java @@ -110,15 +110,15 @@ public class XMLContentExporter implements ContentExporter { private static final Logger LOG = LoggerFactory.getLogger(XMLContentExporter.class); private static final Set TABLE_PREFIXES_TO_BE_EXCLUDED = SetUtils.hashSet( -"QRTZ_", "LOGGING", LoggerDAO.AUDIT_TABLE, JPAReportExec.TABLE, JPATaskExec.TABLE, -JPAUser.TABLE, JPAUPlainAttr.TABLE, JPAUPlainAttrValue.TABLE, JPAUPlainAttrUniqueValue.TABLE, -JPAURelationship.TABLE, JPAUMembership.TABLE, +"QRTZ_", "LOGGING", "NotificationTask_recipients", LoggerDAO.AUDIT_TABLE, JPAReportExec.TABLE, +JPATaskExec.TABLE, JPAUser.TABLE, JPAUPlainAttr.TABLE, JPAUPlainAttrValue.TABLE, +JPAUPlainAttrUniqueValue.TABLE, JPAURelationship.TABLE, JPAUMembership.TABLE, JPAAnyObject.TABLE, JPAAPlainAttr.TABLE, JPAAPlainAttrValue.TABLE, JPAAPlainAttrUniqueValue.TABLE, JPAARelationship.TABLE, JPAAMembership.TABLE, JPAAccessToken.TABLE ); private static final Map TABLES_TO_BE_FILTERED = -Map.of("TASK", "DTYPE <> 'PropagationTask'"); +Map.of("TASK", "DTYPE <> 'PropagationTask' AND DTYPE <> 'NotificationTask'"); private static final Map> COLUMNS_TO_BE_NULLIFIED = Map.of("SYNCOPEGROUP", Set.of("USEROWNER_ID"));
[syncope] branch 2_1_X updated: Exclude notification task from content exporter
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 2_1_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/2_1_X by this push: new 2bc3a23 Exclude notification task from content exporter 2bc3a23 is described below commit 2bc3a231ad8c016b3199fb8ad15af97e9871494b Author: Marco Di Sabatino Di Diodoro AuthorDate: Fri Apr 10 15:53:48 2020 +0200 Exclude notification task from content exporter --- .../syncope/core/persistence/jpa/content/XMLContentExporter.java| 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/content/XMLContentExporter.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/content/XMLContentExporter.java index fb08734..c047755 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/content/XMLContentExporter.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/content/XMLContentExporter.java @@ -105,15 +105,15 @@ import org.xml.sax.helpers.AttributesImpl; public class XMLContentExporter extends AbstractContentDealer implements ContentExporter { protected static final Set TABLE_PREFIXES_TO_BE_EXCLUDED = new HashSet<>(Arrays.asList(new String[] { -"QRTZ_", "LOGGING", LoggerDAO.AUDIT_TABLE, JPAReportExec.TABLE, JPATaskExec.TABLE, -JPAUser.TABLE, JPAUPlainAttr.TABLE, JPAUPlainAttrValue.TABLE, JPAUPlainAttrUniqueValue.TABLE, +"QRTZ_", "LOGGING", "NotificationTask_recipients", LoggerDAO.AUDIT_TABLE, JPAReportExec.TABLE, +JPATaskExec.TABLE, JPAUser.TABLE, JPAUPlainAttr.TABLE, JPAUPlainAttrValue.TABLE, JPAUPlainAttrUniqueValue.TABLE, JPAURelationship.TABLE, JPAUMembership.TABLE, JPAAnyObject.TABLE, JPAAPlainAttr.TABLE, JPAAPlainAttrValue.TABLE, JPAAPlainAttrUniqueValue.TABLE, JPAARelationship.TABLE, JPAAMembership.TABLE, JPAAccessToken.TABLE })); protected static final Map TABLES_TO_BE_FILTERED = -Collections.singletonMap("TASK", "DTYPE <> 'PropagationTask'"); +Collections.singletonMap("TASK", "DTYPE <> 'PropagationTask' AND DTYPE <> 'NotificationTask'"); protected static final Map> COLUMNS_TO_BE_NULLIFIED = Collections.singletonMap("SYNCOPEGROUP", Collections.singleton("USEROWNER_ID"));
[syncope] branch 2_0_X updated: Exclude notification task from content exporter
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 2_0_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/2_0_X by this push: new 0ed4362 Exclude notification task from content exporter 0ed4362 is described below commit 0ed4362683b5190dcfe729433404b31d494c41a8 Author: Marco Di Sabatino Di Diodoro AuthorDate: Fri Apr 10 15:53:48 2020 +0200 Exclude notification task from content exporter --- .../syncope/core/persistence/jpa/content/XMLContentExporter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/content/XMLContentExporter.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/content/XMLContentExporter.java index bc4372a..4531b12 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/content/XMLContentExporter.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/content/XMLContentExporter.java @@ -89,7 +89,7 @@ import org.xml.sax.helpers.AttributesImpl; public class XMLContentExporter extends AbstractContentDealer implements ContentExporter { protected static final Set TABLE_PREFIXES_TO_BE_EXCLUDED = new HashSet<>(Arrays.asList(new String[] { -"QRTZ_", "LOGGING", JPAReportExec.TABLE, JPATaskExec.TABLE, +"QRTZ_", "LOGGING", "NotificationTask_recipients", JPAReportExec.TABLE, JPATaskExec.TABLE, JPAUser.TABLE, JPAUPlainAttr.TABLE, JPAUPlainAttrValue.TABLE, JPAUPlainAttrUniqueValue.TABLE, JPAURelationship.TABLE, JPAUMembership.TABLE, JPAAnyObject.TABLE, JPAAPlainAttr.TABLE, JPAAPlainAttrValue.TABLE, JPAAPlainAttrUniqueValue.TABLE, @@ -97,7 +97,7 @@ public class XMLContentExporter extends AbstractContentDealer implements Content })); protected static final Map TABLES_TO_BE_FILTERED = -Collections.singletonMap("TASK", "DTYPE <> 'PropagationTask'"); +Collections.singletonMap("TASK", "DTYPE <> 'PropagationTask' AND DTYPE <> 'NotificationTask'"); protected static final Map> COLUMNS_TO_BE_NULLIFIED = Collections.singletonMap("SYNCOPEGROUP", Collections.singleton("USEROWNER_ID"));
[syncope] branch master updated: [SYNCOPE-1548] Better management
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/master by this push: new 769f1b2 [SYNCOPE-1548] Better management 769f1b2 is described below commit 769f1b24630581abd2c1b79ddd4209be1c89bf41 Author: Marco Di Sabatino Di Diodoro AuthorDate: Sun Mar 15 17:24:42 2020 +0100 [SYNCOPE-1548] Better management --- .../client/ui/commons/wizards/any/AbstractGroups.java| 10 +- .../syncope/client/console/wizards/any/Groups.java | 16 ++-- .../syncope/client/enduser/wizards/any/Groups.java | 15 ++- 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/wizards/any/AbstractGroups.java b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/wizards/any/AbstractGroups.java index 4e3e8a2..668a89b 100644 --- a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/wizards/any/AbstractGroups.java +++ b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/wizards/any/AbstractGroups.java @@ -35,7 +35,11 @@ public abstract class AbstractGroups extends WizardStep implements ICondition { protected final AnyTO anyTO; -protected final WebMarkupContainer groupsContainer; +protected WebMarkupContainer dyngroupsContainer; + +protected WebMarkupContainer dynrealmsContainer; + +protected WebMarkupContainer groupsContainer; public AbstractGroups(final AnyWrapper modelObject) { super(); @@ -65,6 +69,10 @@ public abstract class AbstractGroups extends WizardStep implements ICondition { protected abstract void addGroupsPanel(); +protected abstract void addDynamicRealmsContainer(); + +protected abstract void addDynamicGroupsContainer(); + @Override public boolean evaluate() { return true; diff --git a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/Groups.java b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/Groups.java index 7aec7e9..3dc6b77 100644 --- a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/Groups.java +++ b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/Groups.java @@ -58,17 +58,13 @@ public class Groups extends AbstractGroups { private static final long serialVersionUID = 55243760966751L; -private final GroupRestClient groupRestClient = new GroupRestClient(); - -private final ConsoleGroupsModel groupsModel; - private final List allDynRealms = new ArrayList<>(); private final boolean templateMode; -protected WebMarkupContainer dyngroupsContainer; +protected final GroupRestClient groupRestClient = new GroupRestClient(); -protected WebMarkupContainer dynrealmsContainer; +protected final ConsoleGroupsModel groupsModel; public Groups(final AnyWrapper modelObject, final boolean templateMode) { super(modelObject); @@ -84,13 +80,12 @@ public class Groups extends AbstractGroups { // - addDynamicGroupsContainer(); - addGroupsPanel(); - addDynamicRealmsContainer(); } -private void addDynamicRealmsContainer() { +@Override +protected void addDynamicRealmsContainer() { dynrealmsContainer = new WebMarkupContainer("dynrealmsContainer"); dynrealmsContainer.setOutputMarkupId(true); dynrealmsContainer.setOutputMarkupPlaceholderTag(true); @@ -180,7 +175,8 @@ public class Groups extends AbstractGroups { } } -private void addDynamicGroupsContainer() { +@Override +protected void addDynamicGroupsContainer() { dyngroupsContainer = new WebMarkupContainer("dyngroupsContainer"); dyngroupsContainer.setOutputMarkupId(true); dyngroupsContainer.setOutputMarkupPlaceholderTag(true); diff --git a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/wizards/any/Groups.java b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/wizards/any/Groups.java index ff60de5..7ce21c7 100644 --- a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/wizards/any/Groups.java +++ b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/wizards/any/Groups.java @@ -40,20 +40,17 @@ public class Groups extends AbstractGroups { private static final long serialVersionUID = 55243760966751L; -private final GroupRestClient groupRestClient = new GroupRestClient(); - -private final AnyTO anyTO; - private final EnduserGroupsModel groupsModel; public Groups(final AnyWrapper modelObject, f
[syncope] branch 2_1_X updated: [SYNCOPE-1548] Better management
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 2_1_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/2_1_X by this push: new cc80886 [SYNCOPE-1548] Better management cc80886 is described below commit cc80886824f0b6ce66f2cf3c123e013cd4a74141 Author: Marco Di Sabatino Di Diodoro AuthorDate: Sun Mar 15 17:24:42 2020 +0100 [SYNCOPE-1548] Better management --- .../client/console/wizards/any/AbstractGroups.java | 78 ++ .../syncope/client/console/wizards/any/Groups.java | 72 +++- 2 files changed, 102 insertions(+), 48 deletions(-) diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AbstractGroups.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AbstractGroups.java new file mode 100644 index 000..0ee9e7f --- /dev/null +++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AbstractGroups.java @@ -0,0 +1,78 @@ +/* + * 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.wizards.any; + +import org.apache.commons.collections4.ListUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.syncope.client.console.wicket.ajax.markup.html.LabelInfo; +import org.apache.syncope.common.lib.to.AnyTO; +import org.apache.wicket.extensions.wizard.WizardStep; +import org.apache.wicket.extensions.wizard.WizardModel.ICondition; +import org.apache.wicket.markup.html.WebMarkupContainer; +import org.apache.wicket.markup.html.basic.Label; + +public abstract class AbstractGroups extends WizardStep implements ICondition { + +private static final long serialVersionUID = -5211384197382796059L; + +protected final AnyTO anyTO; + +protected WebMarkupContainer dyngroupsContainer; + +protected WebMarkupContainer dynrealmsContainer; + +protected WebMarkupContainer groupsContainer; + +public AbstractGroups(final AnyWrapper modelObject) { +super(); +this.anyTO = modelObject.getInnerObject(); + +setOutputMarkupId(true); + +groupsContainer = new WebMarkupContainer("groupsContainer"); +groupsContainer.setOutputMarkupId(true); +groupsContainer.setOutputMarkupPlaceholderTag(true); +add(groupsContainer); + +// -- +// insert changed label if needed +// -- +if (modelObject instanceof UserWrapper +&& UserWrapper.class.cast(modelObject).getPreviousUserTO() != null +&& !ListUtils.isEqualList( + UserWrapper.class.cast(modelObject).getInnerObject().getMemberships(), + UserWrapper.class.cast(modelObject).getPreviousUserTO().getMemberships())) { +groupsContainer.add(new LabelInfo("changed", StringUtils.EMPTY)); +} else { +groupsContainer.add(new Label("changed", StringUtils.EMPTY)); +} +// -- +} + +protected abstract void addGroupsPanel(); + +protected abstract void addDynamicRealmsContainer(); + +protected abstract void addDynamicGroupsContainer(); + +@Override +public boolean evaluate() { +return true; +} +} diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Groups.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Groups.java index 6caed6b..dd94e98 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Groups.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Groups.java @@ -24,7 +24,6 @@ import java.util.List; import java.util.Map; import java.util.function.Function; import java.util.stream.Collectors; -import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.StringUtils; import org.apache.cxf.jaxrs.ext.search.client.CompleteCondition; import org.apache.syncope.client.console.SyncopeConsoleApplication; @@ -32,7 +31,6
[syncope] branch 2_1_X updated: [SYNCOPE-1548] Groups wizard step
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 2_1_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/2_1_X by this push: new 0451e4b [SYNCOPE-1548] Groups wizard step 0451e4b is described below commit 0451e4b16bfc4ea2b837ad0ff2c797acd8601c42 Author: Marco Di Sabatino Di Diodoro AuthorDate: Sun Mar 15 09:43:12 2020 +0100 [SYNCOPE-1548] Groups wizard step --- .../syncope/client/console/wizards/any/Groups.java | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Groups.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Groups.java index 4ec5a26..6caed6b 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Groups.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Groups.java @@ -60,20 +60,22 @@ public class Groups extends WizardStep implements ICondition { private static final long serialVersionUID = 55243760966751L; -private final GroupRestClient groupRestClient = new GroupRestClient(); +private final AnyTO anyTO; -private final List allDynRealms = new DynRealmRestClient().list(); +private boolean templateMode; -private GroupsModel groupsModel; +protected final GroupRestClient groupRestClient = new GroupRestClient(); -private final AnyTO anyTO; +protected final List allDynRealms = new DynRealmRestClient().list(); -private boolean templateMode; +protected GroupsModel groupsModel; protected WebMarkupContainer dyngroupsContainer; protected WebMarkupContainer dynrealmsContainer; +protected WebMarkupContainer groupsContainer; + public Groups(final AnyWrapper modelObject, final boolean templateMode) { super(); this.templateMode = templateMode; @@ -92,7 +94,7 @@ public class Groups extends WizardStep implements ICondition { setOutputMarkupId(true); -WebMarkupContainer groupsContainer = new WebMarkupContainer("groupsContainer"); +groupsContainer = new WebMarkupContainer("groupsContainer"); groupsContainer.setOutputMarkupId(true); groupsContainer.setOutputMarkupPlaceholderTag(true); add(groupsContainer); @@ -214,7 +216,7 @@ public class Groups extends WizardStep implements ICondition { isActionAuthorized(this, RENDER); } -private class GroupsModel extends ListModel { +protected class GroupsModel extends ListModel { private static final long serialVersionUID = -4541954630939063927L;
[syncope] branch master updated: [SYNCOPE-1547] customize the roles to be displayed
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/master by this push: new 1c7349d [SYNCOPE-1547] customize the roles to be displayed 1c7349d is described below commit 1c7349d79de50ae6220dc84b5110a8a510982804 Author: Marco Di Sabatino Di Diodoro AuthorDate: Thu Mar 12 14:50:25 2020 +0100 [SYNCOPE-1547] customize the roles to be displayed --- .../java/org/apache/syncope/client/console/wizards/any/Roles.java | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java index 5997342..6e41848 100644 --- a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java +++ b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java @@ -49,6 +49,8 @@ public class Roles extends WizardStep implements ICondition { private final List allRoles; +protected final UserTO userTO; + protected WebMarkupContainer dynrolesContainer; public Roles(final AnyWrapper modelObject) { @@ -65,7 +67,7 @@ public class Roles extends WizardStep implements ICondition { add(new Label("changed", StringUtils.EMPTY)); } -UserTO entityTO = UserTO.class.cast(modelObject.getInnerObject()); +userTO = UserTO.class.cast(modelObject.getInnerObject()); // - // Pre-Authorizations @@ -111,7 +113,7 @@ public class Roles extends WizardStep implements ICondition { add(dynrolesContainer); dynrolesContainer.add(new AjaxPalettePanel.Builder().build("dynroles", -new PropertyModel<>(entityTO, "dynRoles"), +new PropertyModel<>(userTO, "dynRoles"), new ListModel<>(allRoles)).hideLabel().setEnabled(false).setOutputMarkupId(true)); }
[syncope] branch 2_1_X updated: [SYNCOPE-1547] customize the roles to be displayed
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 2_1_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/2_1_X by this push: new e45a6a4 [SYNCOPE-1547] customize the roles to be displayed e45a6a4 is described below commit e45a6a41248853df71c632b6f53d9b5dc8320baa Author: Marco Di Sabatino Di Diodoro AuthorDate: Thu Mar 12 14:50:25 2020 +0100 [SYNCOPE-1547] customize the roles to be displayed --- .../java/org/apache/syncope/client/console/wizards/any/Roles.java | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java index de99593..0a57a5a 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java @@ -48,7 +48,7 @@ public class Roles extends WizardStep implements ICondition { private final List allRoles; -private UserTO userTO; +protected final UserTO userTO; protected WebMarkupContainer dynrolesContainer; @@ -116,10 +116,6 @@ public class Roles extends WizardStep implements ICondition { new ListModel<>(allRoles)).hideLabel().setEnabled(false).setOutputMarkupId(true)); } -public UserTO getUserTO() { -return userTO; -} - @Override public final boolean evaluate() { return CollectionUtils.isNotEmpty(allRoles)
[syncope] branch 2_1_X updated: [SYNCOPE-1547] customize the roles to be displayed
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 2_1_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/2_1_X by this push: new 4c9e45a [SYNCOPE-1547] customize the roles to be displayed 4c9e45a is described below commit 4c9e45aee7d076262cd6ec4a10415b5f2e33c90e Author: Marco Di Sabatino Di Diodoro AuthorDate: Thu Mar 12 14:24:05 2020 +0100 [SYNCOPE-1547] customize the roles to be displayed --- .../apache/syncope/client/console/wizards/any/Roles.java | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java index ffc28b8..de99593 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java @@ -48,8 +48,10 @@ public class Roles extends WizardStep implements ICondition { private final List allRoles; +private UserTO userTO; + protected WebMarkupContainer dynrolesContainer; - + public Roles(final AnyWrapper modelObject) { if (!(modelObject.getInnerObject() instanceof UserTO)) { throw new IllegalStateException("Invalid instance " + modelObject.getInnerObject()); @@ -64,7 +66,7 @@ public class Roles extends WizardStep implements ICondition { add(new Label("changed", StringUtils.EMPTY)); } -final UserTO entityTO = UserTO.class.cast(modelObject.getInnerObject()); +userTO = UserTO.class.cast(modelObject.getInnerObject()); // - // Pre-Authorizations @@ -110,17 +112,21 @@ public class Roles extends WizardStep implements ICondition { add(dynrolesContainer); dynrolesContainer.add(new AjaxPalettePanel.Builder().build("dynroles", -new PropertyModel<>(entityTO, "dynRoles"), +new PropertyModel<>(userTO, "dynRoles"), new ListModel<>(allRoles)).hideLabel().setEnabled(false).setOutputMarkupId(true)); } +public UserTO getUserTO() { +return userTO; +} + @Override public final boolean evaluate() { return CollectionUtils.isNotEmpty(allRoles) && SyncopeConsoleApplication.get().getSecuritySettings().getAuthorizationStrategy(). isActionAuthorized(this, RENDER); } - + protected List getManagedRoles() { return SyncopeConsoleApplication.get().getSecuritySettings().getAuthorizationStrategy(). isActionAuthorized(this, RENDER)
[syncope] branch master updated: [SYNCOPE-1547] customize the roles to be displayed
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/master by this push: new 479710f [SYNCOPE-1547] customize the roles to be displayed 479710f is described below commit 479710fdb425f1919695391b4b7e45374358554b Author: Marco Di Sabatino Di Diodoro AuthorDate: Wed Mar 11 17:02:33 2020 +0100 [SYNCOPE-1547] customize the roles to be displayed --- .../org/apache/syncope/client/console/wizards/any/Roles.java | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java index ceda3a0..5997342 100644 --- a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java +++ b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java @@ -78,10 +78,7 @@ public class Roles extends WizardStep implements ICondition { this.setOutputMarkupId(true); -allRoles = SyncopeWebApplication.get().getSecuritySettings().getAuthorizationStrategy(). -isActionAuthorized(this, RENDER) -? RoleRestClient.list().stream().map(RoleTO::getKey).sorted().collect(Collectors.toList()) -: List.of(); +allRoles = getManagedRoles(); add(new AjaxPalettePanel.Builder(). withFilter(). @@ -124,4 +121,11 @@ public class Roles extends WizardStep implements ICondition { && SyncopeWebApplication.get().getSecuritySettings().getAuthorizationStrategy(). isActionAuthorized(this, RENDER); } + +protected List getManagedRoles() { +return SyncopeWebApplication.get().getSecuritySettings().getAuthorizationStrategy(). +isActionAuthorized(this, RENDER) +? RoleRestClient.list().stream().map(RoleTO::getKey).sorted().collect(Collectors.toList()) +: List.of(); +} }
[syncope] branch 2_1_X updated: [SYNCOPE-1547] customize the roles to be displayed
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 2_1_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/2_1_X by this push: new 093c066 [SYNCOPE-1547] customize the roles to be displayed 093c066 is described below commit 093c066956ed1867a593e997dba5752cf99a1d2e Author: Marco Di Sabatino Di Diodoro AuthorDate: Wed Mar 11 17:02:33 2020 +0100 [SYNCOPE-1547] customize the roles to be displayed --- .../apache/syncope/client/console/wizards/any/Roles.java | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java index 96fde86..ffc28b8 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java @@ -49,7 +49,7 @@ public class Roles extends WizardStep implements ICondition { private final List allRoles; protected WebMarkupContainer dynrolesContainer; - + public Roles(final AnyWrapper modelObject) { if (!(modelObject.getInnerObject() instanceof UserTO)) { throw new IllegalStateException("Invalid instance " + modelObject.getInnerObject()); @@ -77,10 +77,7 @@ public class Roles extends WizardStep implements ICondition { this.setOutputMarkupId(true); -allRoles = SyncopeConsoleApplication.get().getSecuritySettings().getAuthorizationStrategy(). -isActionAuthorized(this, RENDER) -? new RoleRestClient().list().stream().map(RoleTO::getKey).sorted().collect(Collectors.toList()) -: Collections.emptyList(); +allRoles = getManagedRoles(); add(new AjaxPalettePanel.Builder(). withFilter(). @@ -123,4 +120,11 @@ public class Roles extends WizardStep implements ICondition { && SyncopeConsoleApplication.get().getSecuritySettings().getAuthorizationStrategy(). isActionAuthorized(this, RENDER); } + +protected List getManagedRoles() { +return SyncopeConsoleApplication.get().getSecuritySettings().getAuthorizationStrategy(). +isActionAuthorized(this, RENDER) +? new RoleRestClient().list().stream().map(RoleTO::getKey).sorted().collect(Collectors.toList()) +: Collections.emptyList(); +} }
[syncope] branch 2_1_X updated: [SYNCOPE-1538] Replaced DropDown with a search field
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 2_1_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/2_1_X by this push: new b553278 [SYNCOPE-1538] Replaced DropDown with a search field b553278 is described below commit b55327827004d7ab2a0d75d19315206bc738d803 Author: Marco Di Sabatino Di Diodoro AuthorDate: Wed Feb 5 23:40:11 2020 +0100 [SYNCOPE-1538] Replaced DropDown with a search field --- .../client/console/commons/RealmsUtils.java| 51 ++ .../client/console/panels/RealmChoicePanel.java| 176 ++--- .../client/console/rest/RealmRestClient.java | 8 +- .../client/console/status/ReconTaskPanel.java | 35 +++- .../console/tasks/SchedTaskWizardBuilder.java | 66 ++-- .../syncope/client/console/topology/Topology.java | 16 +- .../markup/html/WebMarkupContainerNoVeil.java | 42 + .../markup/html/form/AjaxSearchFieldPanel.java | 133 .../client/console/wizards/any/Details.java| 53 +-- .../wizards/resources/ConnectorDetailsPanel.java | 45 +- .../META-INF/resources/css/syncopeConsole.css | 19 +-- .../client/console/panels/RealmChoicePanel.html| 11 +- .../console/panels/RealmChoicePanel.properties | 17 ++ .../panels/RealmChoicePanel_fr_CA.properties | 17 ++ .../console/panels/RealmChoicePanel_it.properties | 17 ++ .../console/panels/RealmChoicePanel_ja.properties | 17 ++ .../panels/RealmChoicePanel_pt_BR.properties | 17 ++ .../console/panels/RealmChoicePanel_ru.properties | 17 ++ .../markup/html/form/AjaxCharacterFieldPanel.html | 4 +- ...erFieldPanel.html => AjaxSearchFieldPanel.html} | 1 - .../client/console/wizards/any/Details.html| 8 +- 21 files changed, 631 insertions(+), 139 deletions(-) diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/RealmsUtils.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/RealmsUtils.java new file mode 100644 index 000..2564012 --- /dev/null +++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/RealmsUtils.java @@ -0,0 +1,51 @@ +/* + * 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.commons; + +import org.apache.commons.lang3.StringUtils; +import org.apache.syncope.client.console.SyncopeConsoleSession; +import org.apache.syncope.client.console.rest.RealmRestClient; +import org.apache.syncope.common.lib.SyncopeConstants; +import org.apache.syncope.common.rest.api.beans.RealmQuery; + +public final class RealmsUtils { + +public static final int REALMS_VIEW_SIZE = 20; + +private RealmsUtils() { +// private constructor for static utility class +} + +public static boolean enableSearchRealm() { +return new RealmRestClient().search( +new RealmQuery.Builder().keyword( + SyncopeConsoleSession.get().getAuthRealms().contains(SyncopeConstants.ROOT_REALM) +? SyncopeConstants.ROOT_REALM +: SyncopeConsoleSession.get().getAuthRealms().iterator().next()).build()). +getTotalCount() > REALMS_VIEW_SIZE; +} + +public static boolean checkInput(final String input) { +return StringUtils.isNotBlank(input) && !"*".equals(input); +} + +public static RealmQuery buildQuery(final String input) { +return new RealmQuery.Builder().keyword(input.contains("*") ? input : "*" + input + "*").build(); +} +} diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmChoicePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmChoicePanel.java index a20fbfd..1bac74f 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmChoicePanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmChoicePanel.java @@ -25,14 +25,12 @@ import
[syncope] branch master updated: Fixed label for validation message
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/master by this push: new ba66e38 Fixed label for validation message ba66e38 is described below commit ba66e38f4d39edb0ee46420533f627c48f2ba56e Author: Marco Di Sabatino Di Diodoro AuthorDate: Fri Dec 27 17:09:43 2019 +0100 Fixed label for validation message --- .../syncope/client/ui/commons/markup/html/form/AjaxCheckBoxPanel.java | 3 ++- .../client/ui/commons/markup/html/form/AjaxDateFieldPanel.java| 3 ++- .../client/ui/commons/markup/html/form/AjaxDateTimeFieldPanel.java| 3 ++- .../client/ui/commons/markup/html/form/AjaxDropDownChoicePanel.java | 4 ++-- .../client/console/wicket/markup/html/form/BinaryFieldPanel.java | 4 ++-- .../syncope/client/enduser/markup/html/form/BinaryFieldPanel.java | 4 ++-- 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxCheckBoxPanel.java b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxCheckBoxPanel.java index bb52e5b..0ec0bd0 100644 --- a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxCheckBoxPanel.java +++ b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxCheckBoxPanel.java @@ -30,6 +30,7 @@ import org.apache.wicket.markup.html.form.CheckBox; import org.apache.wicket.markup.html.list.ListItem; import org.apache.wicket.model.IModel; import org.apache.wicket.model.Model; +import org.apache.wicket.model.ResourceModel; public class AjaxCheckBoxPanel extends FieldPanel { @@ -44,7 +45,7 @@ public class AjaxCheckBoxPanel extends FieldPanel { super(id, name, model); field = new CheckBox("checkboxField", model); -add(field.setLabel(new Model<>(name)).setOutputMarkupId(true)); +add(field.setLabel(new ResourceModel(name, name)).setOutputMarkupId(true)); if (enableOnChange && !isReadOnly()) { field.add(new IndicatorAjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) { diff --git a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxDateFieldPanel.java b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxDateFieldPanel.java index 779e6a8..ee9815d 100644 --- a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxDateFieldPanel.java +++ b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxDateFieldPanel.java @@ -23,6 +23,7 @@ import java.util.Date; import org.apache.commons.lang3.time.FastDateFormat; import org.apache.wicket.model.IModel; import org.apache.wicket.model.Model; +import org.apache.wicket.model.ResourceModel; public class AjaxDateFieldPanel extends DateFieldPanel { @@ -36,7 +37,7 @@ public class AjaxDateFieldPanel extends DateFieldPanel { super(id, name, model, datePattern); field = new AjaxDatePicker("field", model, getLocale(), datePattern.getPattern()); -add(field.setLabel(new Model<>(name)).setOutputMarkupId(true)); +add(field.setLabel(new ResourceModel(name, name)).setOutputMarkupId(true)); } @Override diff --git a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxDateTimeFieldPanel.java b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxDateTimeFieldPanel.java index 3fa8af4..cb1ddec 100644 --- a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxDateTimeFieldPanel.java +++ b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxDateTimeFieldPanel.java @@ -23,6 +23,7 @@ import java.util.Date; import org.apache.commons.lang3.time.FastDateFormat; import org.apache.wicket.model.IModel; import org.apache.wicket.model.Model; +import org.apache.wicket.model.ResourceModel; public class AjaxDateTimeFieldPanel extends DateFieldPanel { @@ -39,7 +40,7 @@ public class AjaxDateTimeFieldPanel extends DateFieldPanel { // dateTimePattern should be spit into separate date and time pattern strings in order to be passed to the // AjaxDateTimePicker constructor, but there is no safe way to do that - ignoring field = new AjaxDateTimePicker("field", model, getLocale()); -add(field.setLabel(new Model<>(name)).setOutputMarkupId(true)); +add(field.setLabel(new ResourceModel(name, name)).setOutputMarkupId(true)); } @Override diff --git a/client/idrepo/common-ui/s
[syncope] branch 2_0_X updated: Fixed label for validation message
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 2_0_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/2_0_X by this push: new f2d8e1e Fixed label for validation message f2d8e1e is described below commit f2d8e1e0501306860c2b2c04b5dee2996991c554 Author: Marco Di Sabatino Di Diodoro AuthorDate: Fri Dec 27 17:09:43 2019 +0100 Fixed label for validation message --- .../client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java | 3 ++- .../client/console/wicket/markup/html/form/AjaxDateFieldPanel.java| 3 ++- .../console/wicket/markup/html/form/AjaxDateTimeFieldPanel.java | 3 ++- .../console/wicket/markup/html/form/AjaxDropDownChoicePanel.java | 4 ++-- .../client/console/wicket/markup/html/form/BinaryFieldPanel.java | 4 ++-- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java index 56bd9d9..7727de2 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java @@ -29,6 +29,7 @@ import org.apache.wicket.markup.html.form.CheckBox; import org.apache.wicket.markup.html.list.ListItem; import org.apache.wicket.model.IModel; import org.apache.wicket.model.Model; +import org.apache.wicket.model.ResourceModel; public class AjaxCheckBoxPanel extends FieldPanel { @@ -43,7 +44,7 @@ public class AjaxCheckBoxPanel extends FieldPanel { super(id, name, model); field = new CheckBox("checkboxField", model); -add(field.setLabel(new Model<>(name)).setOutputMarkupId(true)); +add(field.setLabel(new ResourceModel(name, name)).setOutputMarkupId(true)); if (enableOnChange && !isReadOnly()) { field.add(new IndicatorAjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) { diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDateFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDateFieldPanel.java index 78a28fd..4dc9d78 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDateFieldPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDateFieldPanel.java @@ -23,6 +23,7 @@ import java.util.Date; import org.apache.syncope.client.console.SyncopeConsoleSession; import org.apache.wicket.model.IModel; import org.apache.wicket.model.Model; +import org.apache.wicket.model.ResourceModel; public class AjaxDateFieldPanel extends DateFieldPanel { @@ -32,7 +33,7 @@ public class AjaxDateFieldPanel extends DateFieldPanel { super(id, name, model, datePattern); field = new AjaxDatePicker("field", model, SyncopeConsoleSession.get().getLocale(), datePattern); -add(field.setLabel(new Model<>(name)).setOutputMarkupId(true)); +add(field.setLabel(new ResourceModel(name, name)).setOutputMarkupId(true)); } @Override diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDateTimeFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDateTimeFieldPanel.java index f4ad09e..f4aa186 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDateTimeFieldPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDateTimeFieldPanel.java @@ -23,6 +23,7 @@ import java.util.Date; import org.apache.syncope.client.console.SyncopeConsoleSession; import org.apache.wicket.model.IModel; import org.apache.wicket.model.Model; +import org.apache.wicket.model.ResourceModel; public class AjaxDateTimeFieldPanel extends DateFieldPanel { @@ -36,7 +37,7 @@ public class AjaxDateTimeFieldPanel extends DateFieldPanel { // dateTimePattern should be spit into separate date and time pattern strings in order to be passed to the // AjaxDateTimePicker constructor, but there is no safe way to do that - ignoring field = new AjaxDateTimePicker("field", model, SyncopeConsoleSession.get().getLocale()); -add(field.setLabel(new Model<>(name)).setOutputMarkupId(true)); +add(field.setLabel(new ResourceModel(name, name)).setOutputMarkupId(true)); } @Override diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoi
[syncope] branch 2_1_X updated: [SYNCOPE-1522] Realm behaviors for Delegated Administration
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 2_1_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/2_1_X by this push: new f323d43 [SYNCOPE-1522] Realm behaviors for Delegated Administration f323d43 is described below commit f323d4387a640567aa2c465a1f326eb6b36759dc Author: Marco Di Sabatino Di Diodoro AuthorDate: Fri Dec 6 09:55:40 2019 +0100 [SYNCOPE-1522] Realm behaviors for Delegated Administration --- .../client/console/panels/RealmChoicePanel.java| 56 ++ 1 file changed, 15 insertions(+), 41 deletions(-) diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmChoicePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmChoicePanel.java index c173309..1c2b872 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmChoicePanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/RealmChoicePanel.java @@ -92,12 +92,12 @@ public class RealmChoicePanel extends Panel { public RealmChoicePanel(final String id, final PageReference pageRef) { super(id); this.pageRef = pageRef; +availableRealms = SyncopeConsoleSession.get().getAuthRealms(); tree = new HashMap<>(); RealmTO fakeRootRealm = new RealmTO(); fakeRootRealm.setName(SyncopeConstants.ROOT_REALM); fakeRootRealm.setFullPath(SyncopeConstants.ROOT_REALM); -model = Model.of(fakeRootRealm); realmTree = new LoadableDetachableModel>>() { @@ -121,11 +121,14 @@ public class RealmChoicePanel extends Panel { @Override protected List> load() { Map>> map = reloadRealmParentMap(); -model.setObject(map.get(null).getKey()); - -final List> full = new ArrayList<>(); +List> full = new ArrayList<>(); getChildren(full, null, map, StringUtils.EMPTY); -return full; + +return full.stream().filter(realm +-> availableRealms.stream().anyMatch( +availableRealm -> realm.getValue().getFullPath() + .startsWith(availableRealm))).collect(Collectors.toList()); + } }; @@ -145,17 +148,17 @@ public class RealmChoicePanel extends Panel { return left.getKey().compareTo(right.getKey()); } }); - -return dynRealms; +return dynRealms.stream().filter(dynRealm +-> availableRealms.stream().anyMatch( +availableRealm -> SyncopeConstants.ROOT_REALM.equals(availableRealm) +|| dynRealm.getKey().equals(availableRealm))).collect(Collectors.toList()); } }; - + +model = Model.of(realmTree.getObject().stream().findFirst().get().getValue()); container = new WebMarkupContainer("container", realmTree); container.setOutputMarkupId(true); add(container); - -availableRealms = SyncopeConsoleSession.get().getAuthRealms(); - reloadRealmTree(); } @@ -190,22 +193,7 @@ public class RealmChoicePanel extends Panel { BootstrapSelectConfig config = new BootstrapSelectConfig().withLiveSearch(true); config.put(new Key<>("styleBase", "btn"), "btn glyphicon glyphicon-folder-open"); BootstrapSelect> select = -new BootstrapSelect>("realmsLiveSearch", new Model<>(), realms) { - -private static final long serialVersionUID = -12358873583862012L; - -@Override -protected boolean isDisabled( -final Pair object, -final int index, -final String selected) { -return availableRealms.stream().anyMatch(availableRealm -> { -return !SyncopeConstants.ROOT_REALM.equals(availableRealm) -&& !object.getValue().getFullPath().equals(availableRealm); -}); -} -}; - +new BootstrapSelect<>("realmsLiveSearch", new Model<>(), realms); select.with(config); select.setOutputMarkupId(true); select.setChoiceRenderer(new IChoiceRenderer>() { @@ -319,12 +307,6 @@ public class RealmChoicePanel extends Panel { target.add(label); send(pageRef.getPage(), Broadcast.EXACT, new ChosenRealm<>(re
[syncope] branch 2_1_X updated: [SYNCOPE-1521] Role assignment filter
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 2_1_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/2_1_X by this push: new cdd3d42 [SYNCOPE-1521] Role assignment filter cdd3d42 is described below commit cdd3d42a76ad007c4fe1a1e23d7be85ae9015b3d Author: Marco Di Sabatino Di Diodoro AuthorDate: Wed Dec 4 07:34:27 2019 +0100 [SYNCOPE-1521] Role assignment filter --- .../syncope/client/console/wizards/any/Roles.java | 31 +++--- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java index 974d7e9..fd05ced 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java @@ -44,6 +44,8 @@ public class Roles extends WizardStep implements ICondition { private static final long serialVersionUID = 55243760966751L; +private static final int MAX_ROLE_LIST_SIZE = 30; + private final List allRoles; public Roles(final AnyWrapper modelObject) { @@ -79,12 +81,33 @@ public class Roles extends WizardStep implements ICondition { : Collections.emptyList(); Collections.sort(allRoles); -add(new AjaxPalettePanel.Builder().build("roles", -new PropertyModel>(entityTO, "roles"), -new ListModel<>(allRoles)).hideLabel().setOutputMarkupId(true)); +add(new AjaxPalettePanel.Builder(). +withFilter(). +setAllowOrder(true). +build("roles", +new PropertyModel<>(modelObject.getInnerObject(), "roles"), +new AjaxPalettePanel.Builder.Query() { + +private static final long serialVersionUID = 3900199363626636719L; + +@Override +public List execute(final String filter) { +if (StringUtils.isEmpty(filter) || "*".equals(filter)) { +return allRoles.size() > MAX_ROLE_LIST_SIZE +? allRoles.subList(0, MAX_ROLE_LIST_SIZE) +: allRoles; + +} +return allRoles.stream(). +filter(role -> StringUtils.containsIgnoreCase(role, filter)). +collect(Collectors.toList()); +} +}). +hideLabel(). +setOutputMarkupId(true)); add(new AjaxPalettePanel.Builder().build("dynroles", -new PropertyModel>(entityTO, "dynRoles"), +new PropertyModel<>(entityTO, "dynRoles"), new ListModel<>(allRoles)).hideLabel().setEnabled(false).setOutputMarkupId(true)); }
[syncope] branch 2_1_X updated (f23c514 -> 9b51fc0)
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a change to branch 2_1_X in repository https://gitbox.apache.org/repos/asf/syncope.git. from f23c514 [SYNCOPE-1515] Realm selector add 9b51fc0 [SYNCOPE-1515] Realm selector No new revisions were added by this update. Summary of changes: .../java/org/apache/syncope/client/console/panels/RealmChoicePanel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[syncope] branch 2_1_X updated (c8a6b32 -> f23c514)
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a change to branch 2_1_X in repository https://gitbox.apache.org/repos/asf/syncope.git. from c8a6b32 [SYNCOPE-1511] Replace ToStringBuilder#reflectionToString with POJOHelper#serialize add f23c514 [SYNCOPE-1515] Realm selector No new revisions were added by this update. Summary of changes: .../client/console/panels/RealmChoicePanel.java| 309 ++--- .../META-INF/resources/css/syncopeConsole.css | 19 ++ .../client/console/panels/RealmChoicePanel.html| 15 +- .../apache/syncope/fit/console/RealmsITCase.java | 14 +- .../apache/syncope/fit/console/UsersITCase.java| 12 +- 5 files changed, 249 insertions(+), 120 deletions(-)
[syncope] branch 2_1_X updated: [SYNCOPE-1504]
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 2_1_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/2_1_X by this push: new 98064a5 [SYNCOPE-1504] 98064a5 is described below commit 98064a5d9fbcbf49f8ca269483a8fde5acc9492d Author: Marco Di Sabatino Di Diodoro AuthorDate: Tue Oct 15 14:28:43 2019 +0200 [SYNCOPE-1504] --- .../syncope/core/provisioning/java/pushpull/PullJobDelegate.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/PullJobDelegate.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/PullJobDelegate.java index f69b4c9..5f0b248 100644 --- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/PullJobDelegate.java +++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/PullJobDelegate.java @@ -356,7 +356,8 @@ public class PullJobDelegate extends AbstractProvisioningJobDelegate i AnyUtils anyUtils = anyUtilsFactory.getInstance(provision.getAnyType().getKind()); profile.getResults().stream(). filter(result -> result.getUidValue() != null -&& result.getOperation() == ResourceOperation.CREATE). +&& result.getOperation() == ResourceOperation.CREATE +&& result.getAnyType().equals(provision.getAnyType().getKey())). forEach(result -> { anyUtils.addAttr(result.getKey(), provision.getUidOnCreate(), result.getUidValue()); });
[syncope] branch master updated: [SYNCOPE-1504]
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/master by this push: new 352bd60 [SYNCOPE-1504] 352bd60 is described below commit 352bd60131f0cb10526108b54167ffbbab93e731 Author: Marco Di Sabatino Di Diodoro AuthorDate: Tue Oct 15 14:28:43 2019 +0200 [SYNCOPE-1504] --- .../core/provisioning/java/pushpull/PullJobDelegate.java | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/PullJobDelegate.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/PullJobDelegate.java index 26e7377..14de90b 100644 --- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/PullJobDelegate.java +++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/PullJobDelegate.java @@ -351,11 +351,13 @@ public class PullJobDelegate extends AbstractProvisioningJobDelegate i if (provision.getUidOnCreate() != null) { AnyUtils anyUtils = anyUtilsFactory.getInstance(provision.getAnyType().getKind()); -profile.getResults().stream() -.filter(result -> result.getUidValue() != null -&& result.getOperation() == ResourceOperation.CREATE) -.forEach(result -> anyUtils.addAttr(result.getKey(), -provision.getUidOnCreate(), result.getUidValue())); +profile.getResults().stream(). +filter(result -> result.getUidValue() != null +&& result.getOperation() == ResourceOperation.CREATE +&& result.getAnyType().equals(provision.getAnyType().getKey())). +forEach(result -> { +anyUtils.addAttr(result.getKey(), provision.getUidOnCreate(), result.getUidValue()); +}); } } catch (Throwable t) { throw new JobExecutionException("While pulling from connector", t);
[syncope] branch 2_0_X updated: [SYNCOPE-1481] Fix membership attribute panel
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 2_0_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/2_0_X by this push: new 13ab92f [SYNCOPE-1481] Fix membership attribute panel 13ab92f is described below commit 13ab92f8b80171c2826dd01cc5a796a738ef1bf8 Author: Marco Di Sabatino Di Diodoro AuthorDate: Tue Aug 13 10:33:08 2019 +0200 [SYNCOPE-1481] Fix membership attribute panel --- .../wicket/markup/html/form/AjaxCheckBoxPanel.java | 29 .../markup/html/form/AjaxSpinnerFieldPanel.java| 39 ++ .../wicket/markup/html/form/DateFieldPanel.java| 32 ++ .../wicket/markup/html/form/FieldPanel.java| 26 +++ .../client/console/wizards/any/PlainAttrs.java | 25 +- 5 files changed, 127 insertions(+), 24 deletions(-) diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java index 2a2d6e9..56bd9d9 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java @@ -18,10 +18,12 @@ */ package org.apache.syncope.client.console.wicket.markup.html.form; + import java.io.Serializable; import java.util.List; import org.apache.syncope.client.console.commons.Constants; import org.apache.syncope.client.console.wicket.ajax.form.IndicatorAjaxFormComponentUpdatingBehavior; +import org.apache.syncope.common.lib.to.AttributableTO; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.markup.html.form.CheckBox; import org.apache.wicket.markup.html.list.ListItem; @@ -121,4 +123,31 @@ public class AjaxCheckBoxPanel extends FieldPanel { return this; } +@SuppressWarnings({ "rawtypes", "unchecked" }) +public FieldPanel setNewModel(final AttributableTO attributableTO, final String schema) { +field.setModel(new Model() { + +private static final long serialVersionUID = -4214654722524358000L; + +@Override +public Serializable getObject() { +if (!attributableTO.getPlainAttr(schema).getValues().isEmpty()) { +return Boolean.TRUE.toString().equalsIgnoreCase( + attributableTO.getPlainAttr(schema).getValues().get(0)); +} +return null; +} + +@Override +public void setObject(final Serializable object) { +attributableTO.getPlainAttr(schema).getValues().clear(); +attributableTO.getPlainAttr(schema).getValues().add( +object == null ? Boolean.FALSE.toString() : object.toString()); +} + +}); + +return this; +} + } diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxSpinnerFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxSpinnerFieldPanel.java index ae8729a..efadab9 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxSpinnerFieldPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxSpinnerFieldPanel.java @@ -30,6 +30,7 @@ import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; import org.apache.syncope.client.console.commons.Constants; import org.apache.syncope.client.console.wicket.ajax.form.IndicatorAjaxFormComponentUpdatingBehavior; +import org.apache.syncope.common.lib.to.AttributableTO; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.markup.html.list.ListItem; import org.apache.wicket.model.IModel; @@ -173,6 +174,44 @@ public final class AjaxSpinnerFieldPanel extends FieldPanel return this; } +@SuppressWarnings("unchecked") +public FieldPanel setNewModel(final AttributableTO attributableTO, final String schema) { +field.setModel(new Model() { + +private static final long serialVersionUID = -4214654722524358000L; + +@Override +public Serializable getObject() { +List values = attributableTO.getPlainAttr(schema).getValues(); +if (!values.isEmpty()) { +return reference.equals(Integer.class) +? reference.cast(NumberUtils.toInt(values.get(0))) +: reference.equals(Long.class) +? reference.cast(N
[syncope] branch master updated: [SYNCOPE-1481] Fix membership attribute panel
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/master by this push: new bd70d14 [SYNCOPE-1481] Fix membership attribute panel bd70d14 is described below commit bd70d14885d5f03fca33f49558db49774a78e15d Author: Marco Di Sabatino Di Diodoro AuthorDate: Tue Aug 13 10:33:08 2019 +0200 [SYNCOPE-1481] Fix membership attribute panel --- .../markup/html/form/AjaxCheckBoxPanel.java| 28 .../markup/html/form/AjaxSpinnerFieldPanel.java| 39 ++ .../commons/markup/html/form/DateFieldPanel.java | 32 ++ .../ui/commons/markup/html/form/FieldPanel.java| 26 +++ .../client/console/wizards/any/PlainAttrs.java | 37 5 files changed, 132 insertions(+), 30 deletions(-) diff --git a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxCheckBoxPanel.java b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxCheckBoxPanel.java index 596d9b8..895805b 100644 --- a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxCheckBoxPanel.java +++ b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxCheckBoxPanel.java @@ -22,6 +22,7 @@ import java.io.Serializable; import java.util.List; import org.apache.syncope.client.ui.commons.Constants; import org.apache.syncope.client.ui.commons.ajax.form.IndicatorAjaxFormComponentUpdatingBehavior; +import org.apache.syncope.common.lib.Attributable; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.markup.html.form.CheckBox; import org.apache.wicket.markup.html.list.ListItem; @@ -121,4 +122,31 @@ public class AjaxCheckBoxPanel extends FieldPanel { return this; } +@SuppressWarnings({ "rawtypes", "unchecked" }) +public FieldPanel setNewModel(final Attributable attributableTO, final String schema) { +field.setModel(new Model() { + +private static final long serialVersionUID = -4214654722524358000L; + +@Override +public Serializable getObject() { +if (!attributableTO.getPlainAttr(schema).get().getValues().isEmpty()) { +return Boolean.TRUE.toString().equalsIgnoreCase( + attributableTO.getPlainAttr(schema).get().getValues().get(0)); +} +return null; +} + +@Override +public void setObject(final Serializable object) { +attributableTO.getPlainAttr(schema).get().getValues().clear(); +attributableTO.getPlainAttr(schema).get().getValues().add( +object == null ? Boolean.FALSE.toString() : object.toString()); +} + +}); + +return this; +} + } diff --git a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxSpinnerFieldPanel.java b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxSpinnerFieldPanel.java index da80826..3e2181f 100644 --- a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxSpinnerFieldPanel.java +++ b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxSpinnerFieldPanel.java @@ -29,6 +29,7 @@ import java.util.List; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; import org.apache.syncope.client.ui.commons.Constants; +import org.apache.syncope.common.lib.Attributable; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.markup.html.list.ListItem; import org.apache.wicket.model.IModel; @@ -173,6 +174,44 @@ public final class AjaxSpinnerFieldPanel extends FieldPanel return this; } +@SuppressWarnings("unchecked") +public FieldPanel setNewModel(final Attributable attributableTO, final String schema) { +field.setModel(new Model() { + +private static final long serialVersionUID = -4214654722524358000L; + +@Override +public Serializable getObject() { +List values = attributableTO.getPlainAttr(schema).get().getValues(); +if (!values.isEmpty()) { +return reference.equals(Integer.class) +? reference.cast(NumberUtils.toInt(values.get(0))) +: reference.equals(Long.class) +? reference.cast(NumberUtils.toLong(values.get(0))) +: reference.equals(Short.class) +? reference.cast(Nu
[syncope] branch 2_1_X updated: [SYNCOPE-1481] Fix membership attribute panel
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 2_1_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/2_1_X by this push: new 1ff8728 [SYNCOPE-1481] Fix membership attribute panel 1ff8728 is described below commit 1ff8728b99bbc12bbe5887005bb16f0140fa92a2 Author: Marco Di Sabatino Di Diodoro AuthorDate: Tue Aug 13 10:33:08 2019 +0200 [SYNCOPE-1481] Fix membership attribute panel --- .../wicket/markup/html/form/AjaxCheckBoxPanel.java | 29 .../markup/html/form/AjaxSpinnerFieldPanel.java| 39 ++ .../wicket/markup/html/form/DateFieldPanel.java| 32 ++ .../wicket/markup/html/form/FieldPanel.java| 26 +++ .../client/console/wizards/any/PlainAttrs.java | 25 +- 5 files changed, 127 insertions(+), 24 deletions(-) diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java index 2a2d6e9..f273cdc 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java @@ -18,10 +18,12 @@ */ package org.apache.syncope.client.console.wicket.markup.html.form; + import java.io.Serializable; import java.util.List; import org.apache.syncope.client.console.commons.Constants; import org.apache.syncope.client.console.wicket.ajax.form.IndicatorAjaxFormComponentUpdatingBehavior; +import org.apache.syncope.common.lib.to.AttributableTO; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.markup.html.form.CheckBox; import org.apache.wicket.markup.html.list.ListItem; @@ -121,4 +123,31 @@ public class AjaxCheckBoxPanel extends FieldPanel { return this; } +@SuppressWarnings({ "rawtypes", "unchecked" }) +public FieldPanel setNewModel(final AttributableTO attributableTO, final String schema) { +field.setModel(new Model() { + +private static final long serialVersionUID = -4214654722524358000L; + +@Override +public Serializable getObject() { +if (!attributableTO.getPlainAttr(schema).get().getValues().isEmpty()) { +return Boolean.TRUE.toString().equalsIgnoreCase( + attributableTO.getPlainAttr(schema).get().getValues().get(0)); +} +return null; +} + +@Override +public void setObject(final Serializable object) { +attributableTO.getPlainAttr(schema).get().getValues().clear(); +attributableTO.getPlainAttr(schema).get().getValues().add( +object == null ? Boolean.FALSE.toString() : object.toString()); +} + +}); + +return this; +} + } diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxSpinnerFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxSpinnerFieldPanel.java index 1621c9e..ea81daa 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxSpinnerFieldPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxSpinnerFieldPanel.java @@ -29,6 +29,7 @@ import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; import org.apache.syncope.client.console.commons.Constants; import org.apache.syncope.client.console.wicket.ajax.form.IndicatorAjaxFormComponentUpdatingBehavior; +import org.apache.syncope.common.lib.to.AttributableTO; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.markup.html.list.ListItem; import org.apache.wicket.model.IModel; @@ -173,6 +174,44 @@ public final class AjaxSpinnerFieldPanel extends FieldPanel return this; } +@SuppressWarnings("unchecked") +public FieldPanel setNewModel(final AttributableTO attributableTO, final String schema) { +field.setModel(new Model() { + +private static final long serialVersionUID = -4214654722524358000L; + +@Override +public Serializable getObject() { +List values = attributableTO.getPlainAttr(schema).get().getValues(); +if (!values.isEmpty()) { +return reference.equals(Integer.class) +? reference.cast(NumberUtils.toInt(values.get(0))) +: reference.equals(Long.class) +? reference.cast(N
[syncope] 01/01: [SYNCOPE-163] Started to implement the persistence layer for AM
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch SYNCOPE-163 in repository https://gitbox.apache.org/repos/asf/syncope.git commit d72f7efb68f714e665d273605d900e166133ff92 Author: Marco Di Sabatino Di Diodoro AuthorDate: Mon Jun 10 15:30:16 2019 +0200 [SYNCOPE-163] Started to implement the persistence layer for AM --- .../syncope/common/lib/types/AMEntitlement.java| 10 ++ .../common/lib/types/AMImplementationType.java | 36 + .../common/lib/types/AuthModuleConfPropSchema.java | 157 ++ .../common/lib/types/AuthModuleConfProperty.java | 100 .../common/lib/types/AuthenticationPolicyType.java | 31 .../AbstractAuthenticationModuleConf.java | 63 .../AbstractAuthenticationPolicyConf.java | 53 +++ .../authentication/AuthenticationModuleConf.java | 40 + .../authentication/AuthenticationPolicyConf.java | 33 .../ChainAuthenticationPolicyConf.java | 30 .../DefaultAuthenticationModuleConf.java | 31 .../DefaultAuthenticationPolicyConf.java | 59 +++ .../FlowableAuthenticationPolicyConf.java | 30 .../common/lib/types/IdRepoImplementationType.java | 2 +- .../api/dao/AuthenticationChainDAO.java| 39 + .../api/dao/AuthenticationModuleDAO.java | 39 + .../api/dao/AuthenticationModuleRule.java | 33 .../api/dao/AuthenticationModuleRuleConfClass.java | 32 .../api/dao/AuthenticationPolicyRule.java | 33 .../api/dao/AuthenticationPolicyRuleConfClass.java | 32 .../api/dao/AuthenticationPostProcessorRule.java | 23 +++ .../AuthenticationPostProcessorRuleConfClass.java | 23 +++ .../api/dao/AuthenticationPreProcessorRule.java| 30 .../AuthenticationPreProcessorRuleConfClass.java | 23 +++ .../api/dao/AuthenticationProcessorDAO.java| 35 .../core/persistence/api/dao/PolicyDAO.java| 3 + .../syncope/core/persistence/api/entity/Realm.java | 5 + .../entity/authentication/AuthenticationChain.java | 39 + .../authentication/AuthenticationModule.java | 40 + .../AuthenticationPostProcessor.java | 37 + .../authentication/AuthenticationPreProcessor.java | 30 .../authentication/AuthenticationProcessor.java| 34 .../api/entity/policy/AccessPolicy.java| 25 +++ .../api/entity/policy/AuthenticationPolicy.java| 63 .../jpa/dao/JPAAuthenticationChainDAO.java | 76 + .../jpa/dao/JPAAuthenticationModuleDAO.java| 76 + .../jpa/dao/JPAAuthenticationProcessorDAO.java | 82 ++ .../core/persistence/jpa/dao/JPAPolicyDAO.java | 40 +++-- .../core/persistence/jpa/dao/JPARealmDAO.java | 11 +- .../persistence/jpa/entity/JPAEntityFactory.java | 24 +++ .../core/persistence/jpa/entity/JPARealm.java | 21 ++- .../AbstractAuthenticationProcessor.java | 62 .../authentication/JPAAuthenticationChain.java | 90 +++ .../authentication/JPAAuthenticationModule.java| 97 .../JPAAuthenticationPostProcessor.java| 91 +++ .../JPAAuthenticationPreProcessor.java | 64 .../jpa/entity/policy/JPAAccessPolicy.java | 33 .../jpa/entity/policy/JPAAuthenticationPolicy.java | 176 + .../jpa/inner/AuthenticationChainTest.java | 104 .../jpa/inner/AuthenticationModuleTest.java| 106 + .../jpa/inner/AuthenticationProcessorTest.java | 130 +++ .../persistence/jpa/inner/ImplementationTest.java | 15 +- .../core/persistence/jpa/inner/PolicyTest.java | 67 .../src/test/resources/domains/MasterContent.xml | 31 +++- 54 files changed, 2673 insertions(+), 16 deletions(-) diff --git a/common/am/lib/src/main/java/org/apache/syncope/common/lib/types/AMEntitlement.java b/common/am/lib/src/main/java/org/apache/syncope/common/lib/types/AMEntitlement.java index 06d511c..a1ca20a 100644 --- a/common/am/lib/src/main/java/org/apache/syncope/common/lib/types/AMEntitlement.java +++ b/common/am/lib/src/main/java/org/apache/syncope/common/lib/types/AMEntitlement.java @@ -34,6 +34,16 @@ public final class AMEntitlement { public static final String GATEWAY_ROUTE_PUSH = "GATEWAY_ROUTE_PUSH"; +public static final String AUTHENTICATION_MODULE_READ = "AUTHENTICATION_MODULE_READ"; + +public static final String AUTHENTICATION_MODULE_LIST = "AUTHENTICATION_MODULE_LIST"; + +public static final String AUTHENTICATION_MODULE_CREATE = "AUTHENTICATION_MODULE_CREATE"; + +public static final String AUTHENTICATION_MODULE_UPDATE = "AUTHENTICATION_MODULE_UPDATE"; + +public static final String AUTHENTICATION_MODULE_DELETE = "AUT
[syncope] branch SYNCOPE-163 created (now d72f7ef)
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a change to branch SYNCOPE-163 in repository https://gitbox.apache.org/repos/asf/syncope.git. at d72f7ef [SYNCOPE-163] Started to implement the persistence layer for AM This branch includes the following new commits: new d72f7ef [SYNCOPE-163] Started to implement the persistence layer for AM The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[syncope] branch master updated: [SYNCOPE-1473] conservative membership policy management
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/master by this push: new 3d6e0b6 [SYNCOPE-1473] conservative membership policy management 3d6e0b6 is described below commit 3d6e0b6ba70bdfe0b0083215578b3def1fd0a396 Author: Marco Di Sabatino Di Diodoro AuthorDate: Fri May 31 15:25:22 2019 +0200 [SYNCOPE-1473] conservative membership policy management --- .../LDAPMembershipPropagationActions.java | 56 +-- .../syncope/fit/core/PropagationTaskITCase.java| 107 + 2 files changed, 153 insertions(+), 10 deletions(-) diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/LDAPMembershipPropagationActions.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/LDAPMembershipPropagationActions.java index 58fc0d3..d1817ae 100644 --- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/LDAPMembershipPropagationActions.java +++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/LDAPMembershipPropagationActions.java @@ -23,6 +23,7 @@ import java.util.HashSet; import java.util.List; import java.util.Optional; import java.util.Set; +import java.util.TreeSet; import org.apache.commons.jexl3.JexlContext; import org.apache.commons.jexl3.MapContext; import org.apache.commons.lang3.StringUtils; @@ -34,6 +35,7 @@ import org.apache.syncope.core.persistence.api.entity.user.User; import org.apache.syncope.core.provisioning.java.jexl.JexlUtils; import org.apache.syncope.core.persistence.api.dao.AnyTypeDAO; import org.apache.syncope.core.persistence.api.dao.GroupDAO; +import org.apache.syncope.core.persistence.api.entity.resource.ExternalResource; import org.apache.syncope.core.persistence.api.entity.resource.Provision; import org.apache.syncope.core.provisioning.api.propagation.PropagationActions; import org.identityconnectors.framework.common.objects.Attribute; @@ -87,16 +89,14 @@ public class LDAPMembershipPropagationActions implements PropagationActions { userDAO.findAllGroupKeys(user).forEach(groupKey -> { Group group = groupDAO.find(groupKey); if (group != null && groupDAO.findAllResourceKeys(groupKey).contains(task.getResource().getKey())) { -LOG.debug("Evaluating connObjectLink for {}", group); -JexlContext jexlContext = new MapContext(); -JexlUtils.addFieldsToContext(group, jexlContext); - JexlUtils.addPlainAttrsToContext(group.getPlainAttrs(), jexlContext); -JexlUtils.addDerAttrsToContext(group, jexlContext); -String groupConnObjectLinkLink = - JexlUtils.evaluate(provision.get().getMapping().getConnObjectLink(), jexlContext); -LOG.debug("ConnObjectLink for {} is '{}'", group, groupConnObjectLinkLink); -if (StringUtils.isNotBlank(groupConnObjectLinkLink)) { -groupConnObjectLinks.add(groupConnObjectLinkLink); + +String groupConnObjectLink = evaluateGroupConnObjectLink( + provision.get().getMapping().getConnObjectLink(), group); + +LOG.debug("ConnObjectLink for {} is '{}'", group, groupConnObjectLink); +if (StringUtils.isNotBlank(groupConnObjectLink)) { +groupConnObjectLinks.add(groupConnObjectLink); + } } }); @@ -111,7 +111,24 @@ public class LDAPMembershipPropagationActions implements PropagationActions { groups.add(obj.toString()); }); attributes.remove(ldapGroups); + +if (beforeObj != null && beforeObj.getAttributeByName(getGroupMembershipAttrName()) != null) { +Set connObjectLinks = new TreeSet<>(String.CASE_INSENSITIVE_ORDER); +buildManagedGroupConnObjectLinks( +provision.get().getResource(), + provision.get().getMapping().getConnObjectLink(), +connObjectLinks); + +Attribute beforeLdapGroups = beforeObj.getAttributeByName(getGroupMembershipAttrName()); +LOG.debug("Memberships not managed by Syncope: {}", beforeLdapGroups); +for (Object value : beforeLdapGroups.getValue()) { +
[syncope] branch 2_1_X updated: [SYNCOPE-1473] conservative membership policy management
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 2_1_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/2_1_X by this push: new a65b81e [SYNCOPE-1473] conservative membership policy management a65b81e is described below commit a65b81edad95a8990ed7bc3deff377c12667d014 Author: Marco Di Sabatino Di Diodoro AuthorDate: Fri May 31 15:25:22 2019 +0200 [SYNCOPE-1473] conservative membership policy management --- .../LDAPMembershipPropagationActions.java | 56 +-- .../syncope/fit/core/PropagationTaskITCase.java| 105 + 2 files changed, 151 insertions(+), 10 deletions(-) diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/LDAPMembershipPropagationActions.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/LDAPMembershipPropagationActions.java index 58fc0d3..d1817ae 100644 --- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/LDAPMembershipPropagationActions.java +++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/LDAPMembershipPropagationActions.java @@ -23,6 +23,7 @@ import java.util.HashSet; import java.util.List; import java.util.Optional; import java.util.Set; +import java.util.TreeSet; import org.apache.commons.jexl3.JexlContext; import org.apache.commons.jexl3.MapContext; import org.apache.commons.lang3.StringUtils; @@ -34,6 +35,7 @@ import org.apache.syncope.core.persistence.api.entity.user.User; import org.apache.syncope.core.provisioning.java.jexl.JexlUtils; import org.apache.syncope.core.persistence.api.dao.AnyTypeDAO; import org.apache.syncope.core.persistence.api.dao.GroupDAO; +import org.apache.syncope.core.persistence.api.entity.resource.ExternalResource; import org.apache.syncope.core.persistence.api.entity.resource.Provision; import org.apache.syncope.core.provisioning.api.propagation.PropagationActions; import org.identityconnectors.framework.common.objects.Attribute; @@ -87,16 +89,14 @@ public class LDAPMembershipPropagationActions implements PropagationActions { userDAO.findAllGroupKeys(user).forEach(groupKey -> { Group group = groupDAO.find(groupKey); if (group != null && groupDAO.findAllResourceKeys(groupKey).contains(task.getResource().getKey())) { -LOG.debug("Evaluating connObjectLink for {}", group); -JexlContext jexlContext = new MapContext(); -JexlUtils.addFieldsToContext(group, jexlContext); - JexlUtils.addPlainAttrsToContext(group.getPlainAttrs(), jexlContext); -JexlUtils.addDerAttrsToContext(group, jexlContext); -String groupConnObjectLinkLink = - JexlUtils.evaluate(provision.get().getMapping().getConnObjectLink(), jexlContext); -LOG.debug("ConnObjectLink for {} is '{}'", group, groupConnObjectLinkLink); -if (StringUtils.isNotBlank(groupConnObjectLinkLink)) { -groupConnObjectLinks.add(groupConnObjectLinkLink); + +String groupConnObjectLink = evaluateGroupConnObjectLink( + provision.get().getMapping().getConnObjectLink(), group); + +LOG.debug("ConnObjectLink for {} is '{}'", group, groupConnObjectLink); +if (StringUtils.isNotBlank(groupConnObjectLink)) { +groupConnObjectLinks.add(groupConnObjectLink); + } } }); @@ -111,7 +111,24 @@ public class LDAPMembershipPropagationActions implements PropagationActions { groups.add(obj.toString()); }); attributes.remove(ldapGroups); + +if (beforeObj != null && beforeObj.getAttributeByName(getGroupMembershipAttrName()) != null) { +Set connObjectLinks = new TreeSet<>(String.CASE_INSENSITIVE_ORDER); +buildManagedGroupConnObjectLinks( +provision.get().getResource(), + provision.get().getMapping().getConnObjectLink(), +connObjectLinks); + +Attribute beforeLdapGroups = beforeObj.getAttributeByName(getGroupMembershipAttrName()); +LOG.debug("Memberships not managed by Syncope: {}", beforeLdapGroups); +for (Object value : beforeLdapGroups.getValue()) { +
[syncope] branch 2_0_X updated: [SYNCOPE-1473] conservative membership policy management
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 2_0_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/2_0_X by this push: new 7e3d76c [SYNCOPE-1473] conservative membership policy management 7e3d76c is described below commit 7e3d76ca42369bb56598663c9721248a5e5b1f53 Author: Marco Di Sabatino Di Diodoro AuthorDate: Fri May 31 15:25:22 2019 +0200 [SYNCOPE-1473] conservative membership policy management --- .../LDAPMembershipPropagationActions.java | 59 --- .../syncope/fit/core/PropagationTaskITCase.java| 118 + 2 files changed, 164 insertions(+), 13 deletions(-) diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/LDAPMembershipPropagationActions.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/LDAPMembershipPropagationActions.java index c392db2..86ec4a2 100644 --- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/LDAPMembershipPropagationActions.java +++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/propagation/LDAPMembershipPropagationActions.java @@ -22,6 +22,7 @@ import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; +import java.util.TreeSet; import org.apache.commons.jexl3.JexlContext; import org.apache.commons.jexl3.MapContext; import org.apache.commons.lang3.StringUtils; @@ -33,6 +34,7 @@ import org.apache.syncope.core.persistence.api.entity.user.User; import org.apache.syncope.core.provisioning.java.jexl.JexlUtils; import org.apache.syncope.core.persistence.api.dao.AnyTypeDAO; import org.apache.syncope.core.persistence.api.dao.GroupDAO; +import org.apache.syncope.core.persistence.api.entity.resource.ExternalResource; import org.apache.syncope.core.persistence.api.entity.resource.Provision; import org.identityconnectors.framework.common.objects.Attribute; import org.identityconnectors.framework.common.objects.AttributeBuilder; @@ -87,33 +89,45 @@ public class LDAPMembershipPropagationActions extends DefaultPropagationActions for (String groupKey : userDAO.findAllGroupKeys(user)) { Group group = groupDAO.find(groupKey); if (group != null && groupDAO.findAllResourceKeys(groupKey).contains(task.getResource().getKey())) { -LOG.debug("Evaluating connObjectLink for {}", group); - -JexlContext jexlContext = new MapContext(); -JexlUtils.addFieldsToContext(group, jexlContext); - JexlUtils.addPlainAttrsToContext(group.getPlainAttrs(), jexlContext); -JexlUtils.addDerAttrsToContext(group, jexlContext); - -String groupConnObjectLinkLink = - JexlUtils.evaluate(provision.getMapping().getConnObjectLink(), jexlContext); -LOG.debug("ConnObjectLink for {} is '{}'", group, groupConnObjectLinkLink); -if (StringUtils.isNotBlank(groupConnObjectLinkLink)) { -groupConnObjectLinks.add(groupConnObjectLinkLink); + +String groupConnObjectLink = evaluateGroupConnObjectLink( +provision.getMapping().getConnObjectLink(), group); + +LOG.debug("ConnObjectLink for {} is '{}'", group, groupConnObjectLink); +if (StringUtils.isNotBlank(groupConnObjectLink)) { +groupConnObjectLinks.add(groupConnObjectLink); } } } LOG.debug("Group connObjectLinks to propagate for membership: {}", groupConnObjectLinks); Set attributes = new HashSet<>(task.getAttributes()); - Set groups = new HashSet<>(groupConnObjectLinks); Attribute ldapGroups = AttributeUtil.find(getGroupMembershipAttrName(), attributes); + if (ldapGroups != null) { for (Object obj : ldapGroups.getValue()) { groups.add(obj.toString()); } attributes.remove(ldapGroups); + +if (beforeObj != null && beforeObj.getAttributeByName(getGroupMembershipAttrName()) != null) { +Set connObjectLinks = new TreeSet<>(String.CASE_INSENSITIVE_ORDER); +buildManagedGroupConnObjectLinks( +provision.getResource(), +provision.getMapping().getConnObjectLink(), +
[syncope] branch master updated: [SYNCOPE-1467] Added test
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/master by this push: new bb7c2ba [SYNCOPE-1467] Added test bb7c2ba is described below commit bb7c2ba5d2cb60abe7e8f4aeb48615e8c2e79647 Author: Marco Di Sabatino Di Diodoro AuthorDate: Tue May 7 11:41:32 2019 +0200 [SYNCOPE-1467] Added test --- .../org/apache/syncope/fit/core/GroupITCase.java | 39 ++ pom.xml| 2 +- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/GroupITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/GroupITCase.java index dd38ac8..d350405 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/GroupITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/GroupITCase.java @@ -1118,4 +1118,43 @@ public class GroupITCase extends AbstractITCase { assertNotNull(groupTO); assertEquals("11.23", groupTO.getPlainAttr(doubleSchemaName).get().getValues().get(0)); } + +@Test +public void issueSYNCOPE1467() { +GroupTO groupTO = null; +try { +GroupCR groupCR = new GroupCR(); +groupCR.setRealm(SyncopeConstants.ROOT_REALM); +groupCR.setName("issueSYNCOPE1467"); +groupCR.getResources().add(RESOURCE_NAME_LDAP); + +groupTO = createGroup(groupCR).getEntity(); +assertNotNull(groupTO); +assertTrue(groupTO.getResources().contains(RESOURCE_NAME_LDAP)); + +ConnObjectTO connObjectTO = +resourceService.readConnObject(RESOURCE_NAME_LDAP, AnyTypeKind.GROUP.name(), groupTO.getKey()); +assertNotNull(connObjectTO); +assertEquals("issueSYNCOPE1467", connObjectTO.getAttr("cn").get().getValues().get(0)); + +GroupUR groupUR = new GroupUR(); +groupUR.setKey(groupTO.getKey()); +groupUR.setName(new StringReplacePatchItem.Builder().value("fixedSYNCOPE1467").build()); + +assertNotNull(updateGroup(groupUR).getEntity()); + +// Assert resources are present +ResourceTO ldap = resourceService.read(RESOURCE_NAME_LDAP); +assertNotNull(ldap); + +connObjectTO = resourceService. +readConnObject(RESOURCE_NAME_LDAP, AnyTypeKind.GROUP.name(), groupTO.getKey()); +assertNotNull(connObjectTO); +assertEquals("fixedSYNCOPE1467", connObjectTO.getAttr("cn").get().getValues().get(0)); +} finally { +if (groupTO.getKey() != null) { +groupService.delete(groupTO.getKey()); +} +} +} } diff --git a/pom.xml b/pom.xml index 9a59100..4707a24 100644 --- a/pom.xml +++ b/pom.xml @@ -382,7 +382,7 @@ under the License. 1.0.4 2.2.6 0.8.8 -1.5.3 +1.5.4-SNAPSHOT 1.3.6 1.4.2 1.0.1
[syncope] branch 2_1_X updated: [SYNCOPE-1467] Added test
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 2_1_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/2_1_X by this push: new 1ceeccc [SYNCOPE-1467] Added test 1ceeccc is described below commit 1ceecccec496e8d7e92042cb6dcd2e609e25f1d8 Author: Marco Di Sabatino Di Diodoro AuthorDate: Tue May 7 11:41:32 2019 +0200 [SYNCOPE-1467] Added test --- .../org/apache/syncope/fit/core/GroupITCase.java | 39 ++ pom.xml| 2 +- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/GroupITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/GroupITCase.java index de39e53..33cbe38 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/GroupITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/GroupITCase.java @@ -1116,4 +1116,43 @@ public class GroupITCase extends AbstractITCase { assertNotNull(groupTO); assertEquals("11.23", groupTO.getPlainAttr(doubleSchemaName).get().getValues().get(0)); } + +@Test +public void issueSYNCOPE1467() { +GroupTO groupTO = null; +try { +groupTO = new GroupTO(); +groupTO.setRealm(SyncopeConstants.ROOT_REALM); +groupTO.setName("issueSYNCOPE1467"); +groupTO.getResources().add(RESOURCE_NAME_LDAP); + +groupTO = createGroup(groupTO).getEntity(); +assertNotNull(groupTO); +assertTrue(groupTO.getResources().contains(RESOURCE_NAME_LDAP)); + +ConnObjectTO connObjectTO = +resourceService.readConnObject(RESOURCE_NAME_LDAP, AnyTypeKind.GROUP.name(), groupTO.getKey()); +assertNotNull(connObjectTO); +assertEquals("issueSYNCOPE1467", connObjectTO.getAttr("cn").get().getValues().get(0)); + +GroupPatch groupPatch = new GroupPatch(); +groupPatch.setKey(groupTO.getKey()); +groupPatch.setName(new StringReplacePatchItem.Builder().value("fixedSYNCOPE1467").build()); + +assertNotNull(updateGroup(groupPatch).getEntity()); + +// Assert resources are present +ResourceTO ldap = resourceService.read(RESOURCE_NAME_LDAP); +assertNotNull(ldap); + +connObjectTO = resourceService. +readConnObject(RESOURCE_NAME_LDAP, AnyTypeKind.GROUP.name(), groupTO.getKey()); +assertNotNull(connObjectTO); +assertEquals("fixedSYNCOPE1467", connObjectTO.getAttr("cn").get().getValues().get(0)); +} finally { +if (groupTO.getKey() != null) { +groupService.delete(groupTO.getKey()); +} +} +} } diff --git a/pom.xml b/pom.xml index 672334a..9aa37a2 100644 --- a/pom.xml +++ b/pom.xml @@ -382,7 +382,7 @@ under the License. 1.0.4 2.2.6 0.8.8 -1.5.3 +1.5.4-SNAPSHOT 1.3.6 1.4.2 1.0.1
[syncope] branch 2_0_X updated: [SYNCOPE-1467] Added test
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 2_0_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/2_0_X by this push: new 4baa5b5 [SYNCOPE-1467] Added test 4baa5b5 is described below commit 4baa5b56e5f199b71c248f4058b3841f25cef936 Author: Marco Di Sabatino Di Diodoro AuthorDate: Tue May 7 11:41:32 2019 +0200 [SYNCOPE-1467] Added test --- .../org/apache/syncope/fit/core/GroupITCase.java | 39 ++ pom.xml| 2 +- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/GroupITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/GroupITCase.java index 04b141e..181af3c 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/GroupITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/GroupITCase.java @@ -1177,4 +1177,43 @@ public class GroupITCase extends AbstractITCase { assertNotNull(groupTO); assertEquals("11.23", groupTO.getPlainAttr(doubleSchemaName).getValues().get(0)); } + +@Test +public void issueSYNCOPE1467() { +GroupTO groupTO = null; +try { +groupTO = new GroupTO(); +groupTO.setRealm(SyncopeConstants.ROOT_REALM); +groupTO.setName("issueSYNCOPE1467"); +groupTO.getResources().add(RESOURCE_NAME_LDAP); + +groupTO = createGroup(groupTO).getEntity(); +assertNotNull(groupTO); +assertTrue(groupTO.getResources().contains(RESOURCE_NAME_LDAP)); + +ConnObjectTO connObjectTO = +resourceService.readConnObject(RESOURCE_NAME_LDAP, AnyTypeKind.GROUP.name(), groupTO.getKey()); +assertNotNull(connObjectTO); +assertEquals("issueSYNCOPE1467", connObjectTO.getAttr("cn").getValues().get(0)); + +GroupPatch groupPatch = new GroupPatch(); +groupPatch.setKey(groupTO.getKey()); +groupPatch.setName(new StringReplacePatchItem.Builder().value("fixedSYNCOPE1467").build()); + +assertNotNull(updateGroup(groupPatch).getEntity()); + +// Assert resources are present +ResourceTO ldap = resourceService.read(RESOURCE_NAME_LDAP); +assertNotNull(ldap); + +connObjectTO = resourceService. +readConnObject(RESOURCE_NAME_LDAP, AnyTypeKind.GROUP.name(), groupTO.getKey()); +assertNotNull(connObjectTO); +assertEquals("fixedSYNCOPE1467", connObjectTO.getAttr("cn").getValues().get(0)); +} finally { +if (groupTO.getKey() != null) { +groupService.delete(groupTO.getKey()); +} +} +} } diff --git a/pom.xml b/pom.xml index e88f83a..43d72bb 100644 --- a/pom.xml +++ b/pom.xml @@ -382,7 +382,7 @@ under the License. 1.0.4 2.2.6 0.8.8 -1.5.3 +1.5.4-SNAPSHOT 1.3.6 1.4.2 1.0.1
[syncope] branch master updated: [SYNCOPE-1408] Fix plain and vir re-add
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/master by this push: new eaf70b1 [SYNCOPE-1408] Fix plain and vir re-add eaf70b1 is described below commit eaf70b1fbec40958ab917da88ff0797bd4abe09f Author: Marco Di Sabatino Di Diodoro AuthorDate: Mon Jan 14 14:40:55 2019 +0100 [SYNCOPE-1408] Fix plain and vir re-add --- .../client/console/wizards/any/AnyWizardBuilder.java | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyWizardBuilder.java b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyWizardBuilder.java index d2149dd..85c055c 100644 --- a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyWizardBuilder.java +++ b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyWizardBuilder.java @@ -27,8 +27,8 @@ import org.apache.syncope.client.console.layout.GroupFormLayoutInfo; import org.apache.syncope.client.console.layout.UserFormLayoutInfo; import org.apache.syncope.client.console.wizards.AjaxWizard; import org.apache.syncope.client.console.wizards.AjaxWizardBuilder; +import org.apache.syncope.common.lib.Attr; import org.apache.syncope.common.lib.to.AnyTO; -import org.apache.syncope.common.lib.to.AttrTO; import org.apache.syncope.common.lib.to.GroupTO; import org.apache.syncope.common.lib.to.GroupableRelatableTO; import org.apache.syncope.common.lib.to.UserTO; @@ -176,14 +176,14 @@ public abstract class AnyWizardBuilder extends AjaxWizardBuilde protected void fixPlainAndVirAttrs(final AnyTO updated, final AnyTO original) { // re-add to the updated object any missing plain or virtual attribute (compared to original): this to cope with // form layout, which might have not included some plain or virtual attributes -for (AttrTO plainAttrTO : original.getPlainAttrs()) { -if (!updated.getPlainAttr(plainAttrTO.getSchema()).isPresent()) { -updated.getPlainAttrs().add(plainAttrTO); +for (Attr plainAttr : original.getPlainAttrs()) { +if (!updated.getPlainAttr(plainAttr.getSchema()).isPresent()) { +updated.getPlainAttrs().add(plainAttr); } } -for (AttrTO virAttrTO : original.getVirAttrs()) { -if (!updated.getVirAttr(virAttrTO.getSchema()).isPresent()) { -updated.getVirAttrs().add(virAttrTO); +for (Attr virAttr : original.getVirAttrs()) { +if (!updated.getVirAttr(virAttr.getSchema()).isPresent()) { +updated.getVirAttrs().add(virAttr); } } if (updated instanceof GroupableRelatableTO && original instanceof GroupableRelatableTO) {
[syncope] branch master updated: [SYNCOPE-1408] Fix plain and vir re-add
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/master by this push: new cc1119a [SYNCOPE-1408] Fix plain and vir re-add cc1119a is described below commit cc1119af3585f1023494f1741a073d1b3bc5ab5b Author: Marco Di Sabatino Di Diodoro AuthorDate: Mon Jan 14 11:23:18 2019 +0100 [SYNCOPE-1408] Fix plain and vir re-add --- .../client/console/wizards/any/AnyWizardBuilder.java| 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyWizardBuilder.java b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyWizardBuilder.java index 3d14656..d2149dd 100644 --- a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyWizardBuilder.java +++ b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyWizardBuilder.java @@ -28,6 +28,7 @@ import org.apache.syncope.client.console.layout.UserFormLayoutInfo; import org.apache.syncope.client.console.wizards.AjaxWizard; import org.apache.syncope.client.console.wizards.AjaxWizardBuilder; import org.apache.syncope.common.lib.to.AnyTO; +import org.apache.syncope.common.lib.to.AttrTO; import org.apache.syncope.common.lib.to.GroupTO; import org.apache.syncope.common.lib.to.GroupableRelatableTO; import org.apache.syncope.common.lib.to.UserTO; @@ -175,12 +176,16 @@ public abstract class AnyWizardBuilder extends AjaxWizardBuilde protected void fixPlainAndVirAttrs(final AnyTO updated, final AnyTO original) { // re-add to the updated object any missing plain or virtual attribute (compared to original): this to cope with // form layout, which might have not included some plain or virtual attributes -original.getPlainAttrs().stream(). -filter(attr -> updated.getPlainAttr(attr.getSchema()).isPresent()). -forEach(attr -> updated.getPlainAttrs().add(attr)); -original.getVirAttrs().stream(). -filter(attr -> updated.getVirAttr(attr.getSchema()).isPresent()). -forEach(attr -> updated.getVirAttrs().add(attr)); +for (AttrTO plainAttrTO : original.getPlainAttrs()) { +if (!updated.getPlainAttr(plainAttrTO.getSchema()).isPresent()) { +updated.getPlainAttrs().add(plainAttrTO); +} +} +for (AttrTO virAttrTO : original.getVirAttrs()) { +if (!updated.getVirAttr(virAttrTO.getSchema()).isPresent()) { +updated.getVirAttrs().add(virAttrTO); +} +} if (updated instanceof GroupableRelatableTO && original instanceof GroupableRelatableTO) { GroupableRelatableTO.class.cast(original).getMemberships().forEach(oMemb -> { GroupableRelatableTO.class.cast(updated).getMembership(oMemb.getGroupKey()).ifPresent(uMemb -> {
[syncope] branch 2_1_X updated: [SYNCOPE-1408] Fix plain and vir re-add
This is an automated email from the ASF dual-hosted git repository. mdisabatino pushed a commit to branch 2_1_X in repository https://gitbox.apache.org/repos/asf/syncope.git The following commit(s) were added to refs/heads/2_1_X by this push: new 4cd21ad [SYNCOPE-1408] Fix plain and vir re-add 4cd21ad is described below commit 4cd21ad1862cee6190226a60244f2f640888e585 Author: Marco Di Sabatino Di Diodoro AuthorDate: Mon Jan 14 11:23:18 2019 +0100 [SYNCOPE-1408] Fix plain and vir re-add --- .../client/console/wizards/any/AnyWizardBuilder.java| 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyWizardBuilder.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyWizardBuilder.java index 783aa79..4076d77 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyWizardBuilder.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyWizardBuilder.java @@ -27,6 +27,7 @@ import org.apache.syncope.client.console.layout.UserFormLayoutInfo; import org.apache.syncope.client.console.wizards.AjaxWizard; import org.apache.syncope.client.console.wizards.AjaxWizardBuilder; import org.apache.syncope.common.lib.to.AnyTO; +import org.apache.syncope.common.lib.to.AttrTO; import org.apache.syncope.common.lib.to.GroupTO; import org.apache.syncope.common.lib.to.GroupableRelatableTO; import org.apache.syncope.common.lib.to.UserTO; @@ -176,12 +177,16 @@ public abstract class AnyWizardBuilder extends AjaxWizardBuilde protected void fixPlainAndVirAttrs(final AnyTO updated, final AnyTO original) { // re-add to the updated object any missing plain or virtual attribute (compared to original): this to cope with // form layout, which might have not included some plain or virtual attributes -original.getPlainAttrs().stream(). -filter(attr -> updated.getPlainAttr(attr.getSchema()).isPresent()). -forEach(attr -> updated.getPlainAttrs().add(attr)); -original.getVirAttrs().stream(). -filter(attr -> updated.getVirAttr(attr.getSchema()).isPresent()). -forEach(attr -> updated.getVirAttrs().add(attr)); +for (AttrTO plainAttrTO : original.getPlainAttrs()) { +if (!updated.getPlainAttr(plainAttrTO.getSchema()).isPresent()) { +updated.getPlainAttrs().add(plainAttrTO); +} +} +for (AttrTO virAttrTO : original.getVirAttrs()) { +if (!updated.getVirAttr(virAttrTO.getSchema()).isPresent()) { +updated.getVirAttrs().add(virAttrTO); +} +} if (updated instanceof GroupableRelatableTO && original instanceof GroupableRelatableTO) { GroupableRelatableTO.class.cast(original).getMemberships().forEach(oMemb -> { GroupableRelatableTO.class.cast(updated).getMembership(oMemb.getGroupKey()).ifPresent(uMemb -> {
syncope git commit: [SYNCOPE-1365] Fix approval process
Repository: syncope Updated Branches: refs/heads/2_1_X 38dc035f1 -> 272dc9790 [SYNCOPE-1365] Fix approval process Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/272dc979 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/272dc979 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/272dc979 Branch: refs/heads/2_1_X Commit: 272dc9790eb097879266ff938caffecb367e0593 Parents: 38dc035 Author: Marco Di Sabatino Di Diodoro Authored: Wed Sep 5 14:47:42 2018 +0200 Committer: Marco Di Sabatino Di Diodoro Committed: Wed Sep 5 14:49:25 2018 +0200 -- .../core/workflow/flowable/FlowableUserWorkflowAdapter.java| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/272dc979/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/FlowableUserWorkflowAdapter.java -- diff --git a/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/FlowableUserWorkflowAdapter.java b/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/FlowableUserWorkflowAdapter.java index 94e7127..d71d8c2 100644 --- a/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/FlowableUserWorkflowAdapter.java +++ b/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/FlowableUserWorkflowAdapter.java @@ -623,7 +623,7 @@ public class FlowableUserWorkflowAdapter extends AbstractUserWorkflowAdapter { forms = getForms(engine.getTaskService().createTaskQuery(). taskVariableValueEquals(TASK_IS_FORM, Boolean.TRUE). -taskCandidateOrAssigned(user.getKey()), page, size, orderByClauses); +taskCandidateOrAssigned(user.getUsername()), page, size, orderByClauses); List candidateGroups = new ArrayList<>(); userDAO.findAllGroupNames(user).forEach(group -> {
syncope git commit: [SYNCOPE-1365] Fix approval process
Repository: syncope Updated Branches: refs/heads/master 8ebd80aab -> 1068667e9 [SYNCOPE-1365] Fix approval process Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/1068667e Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/1068667e Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/1068667e Branch: refs/heads/master Commit: 1068667e90c41cb75d5a508d43f953294646c1b6 Parents: 8ebd80a Author: Marco Di Sabatino Di Diodoro Authored: Wed Sep 5 14:47:42 2018 +0200 Committer: Marco Di Sabatino Di Diodoro Committed: Wed Sep 5 14:49:02 2018 +0200 -- .../core/workflow/flowable/FlowableUserWorkflowAdapter.java| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/1068667e/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/FlowableUserWorkflowAdapter.java -- diff --git a/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/FlowableUserWorkflowAdapter.java b/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/FlowableUserWorkflowAdapter.java index 94e7127..d71d8c2 100644 --- a/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/FlowableUserWorkflowAdapter.java +++ b/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/FlowableUserWorkflowAdapter.java @@ -623,7 +623,7 @@ public class FlowableUserWorkflowAdapter extends AbstractUserWorkflowAdapter { forms = getForms(engine.getTaskService().createTaskQuery(). taskVariableValueEquals(TASK_IS_FORM, Boolean.TRUE). -taskCandidateOrAssigned(user.getKey()), page, size, orderByClauses); +taskCandidateOrAssigned(user.getUsername()), page, size, orderByClauses); List candidateGroups = new ArrayList<>(); userDAO.findAllGroupNames(user).forEach(group -> {
syncope git commit: [SYNCOPE-1352] Group wizard doesn't update the plain attributes
Repository: syncope Updated Branches: refs/heads/2_0_X 2569668a6 -> feebe33c5 [SYNCOPE-1352] Group wizard doesn't update the plain attributes Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/feebe33c Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/feebe33c Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/feebe33c Branch: refs/heads/2_0_X Commit: feebe33c57d03f0e6c4dc590c2f68fb1907cdb6c Parents: 2569668 Author: Marco Di Sabatino Di Diodoro Authored: Fri Aug 10 15:45:14 2018 +0200 Committer: Marco Di Sabatino Di Diodoro Committed: Fri Aug 10 15:45:14 2018 +0200 -- .../syncope/client/console/wizards/any/AnyObjectWizardBuilder.java | 1 + .../syncope/client/console/wizards/any/GroupWizardBuilder.java | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/feebe33c/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyObjectWizardBuilder.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyObjectWizardBuilder.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyObjectWizardBuilder.java index 025998c..4ba73c8 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyObjectWizardBuilder.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyObjectWizardBuilder.java @@ -53,6 +53,7 @@ public class AnyObjectWizardBuilder extends AnyWizardBuilder implem if (inner.getKey() == null) { result = anyObjectRestClient.create(inner); } else { + inner.getPlainAttrs().addAll(cleanEmptyPlainAttrs(inner.getPlainAttrs())); AnyObjectPatch patch = AnyOperations.diff(inner, getOriginalItem().getInnerObject(), false); // update just if it is changed http://git-wip-us.apache.org/repos/asf/syncope/blob/feebe33c/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/GroupWizardBuilder.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/GroupWizardBuilder.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/GroupWizardBuilder.java index 1d75f9a..52fd40c 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/GroupWizardBuilder.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/GroupWizardBuilder.java @@ -72,7 +72,6 @@ public class GroupWizardBuilder extends AnyWizardBuilder implements Gro if (inner.getKey() == null) { result = groupRestClient.create(inner); } else { -inner.getPlainAttrs().clear(); inner.getPlainAttrs().addAll(cleanEmptyPlainAttrs(inner.getPlainAttrs())); GroupPatch patch = AnyOperations.diff(inner, getOriginalItem().getInnerObject(), false); GroupTO originaObj = getOriginalItem().getInnerObject();
syncope git commit: [SYNCOPE-1352] Group wizard doesn't update the plain attributes
Repository: syncope Updated Branches: refs/heads/master 8b8e9336b -> 05f70d9d1 [SYNCOPE-1352] Group wizard doesn't update the plain attributes Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/05f70d9d Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/05f70d9d Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/05f70d9d Branch: refs/heads/master Commit: 05f70d9d1f2b95f103b1ad7b89ed18ee20aab911 Parents: 8b8e933 Author: Marco Di Sabatino Di Diodoro Authored: Fri Aug 10 15:45:14 2018 +0200 Committer: Marco Di Sabatino Di Diodoro Committed: Fri Aug 10 15:47:36 2018 +0200 -- .../syncope/client/console/wizards/any/AnyObjectWizardBuilder.java | 1 + .../syncope/client/console/wizards/any/GroupWizardBuilder.java | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/05f70d9d/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyObjectWizardBuilder.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyObjectWizardBuilder.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyObjectWizardBuilder.java index 184de10..8e21f0f 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyObjectWizardBuilder.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyObjectWizardBuilder.java @@ -72,6 +72,7 @@ public class AnyObjectWizardBuilder extends AnyWizardBuilder implem if (inner.getKey() == null) { result = anyObjectRestClient.create(inner); } else { + inner.getPlainAttrs().addAll(cleanEmptyPlainAttrs(inner.getPlainAttrs())); AnyObjectPatch patch = AnyOperations.diff(inner, getOriginalItem().getInnerObject(), false); // update just if it is changed http://git-wip-us.apache.org/repos/asf/syncope/blob/05f70d9d/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/GroupWizardBuilder.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/GroupWizardBuilder.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/GroupWizardBuilder.java index ea4c22e..81c6648 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/GroupWizardBuilder.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/GroupWizardBuilder.java @@ -91,7 +91,6 @@ public class GroupWizardBuilder extends AnyWizardBuilder implements Gro if (inner.getKey() == null) { result = groupRestClient.create(inner); } else { -inner.getPlainAttrs().clear(); inner.getPlainAttrs().addAll(cleanEmptyPlainAttrs(inner.getPlainAttrs())); GroupPatch patch = AnyOperations.diff(inner, getOriginalItem().getInnerObject(), false); GroupTO originaObj = getOriginalItem().getInnerObject();
syncope git commit: [SYNCOPE-1326] Fix Wizard behavior
Repository: syncope Updated Branches: refs/heads/master ee5023556 -> 6a9d55754 [SYNCOPE-1326] Fix Wizard behavior Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/6a9d5575 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/6a9d5575 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/6a9d5575 Branch: refs/heads/master Commit: 6a9d557545eb9e35910af4cc32668f649b61cdbe Parents: ee50235 Author: Marco Di Sabatino Di Diodoro Authored: Fri Jun 22 16:01:29 2018 +0200 Committer: Marco Di Sabatino Di Diodoro Committed: Fri Jun 22 17:21:54 2018 +0200 -- .../client/console/wizards/any/AnyWizardBuilder.java | 10 ++ .../client/console/wizards/any/GroupWizardBuilder.java| 2 ++ .../client/console/wizards/any/UserWizardBuilder.java | 1 + 3 files changed, 13 insertions(+) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/6a9d5575/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyWizardBuilder.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyWizardBuilder.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyWizardBuilder.java index 2ac9b60..ec3ff78 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyWizardBuilder.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyWizardBuilder.java @@ -18,7 +18,9 @@ */ package org.apache.syncope.client.console.wizards.any; +import java.util.HashSet; import java.util.List; +import java.util.Set; import org.apache.syncope.client.console.layout.AbstractAnyFormLayout; import org.apache.syncope.client.console.layout.AnyForm; import org.apache.syncope.client.console.layout.AnyObjectFormLayoutInfo; @@ -27,6 +29,7 @@ import org.apache.syncope.client.console.layout.UserFormLayoutInfo; import org.apache.syncope.client.console.wizards.AjaxWizard; import org.apache.syncope.client.console.wizards.AjaxWizardBuilder; import org.apache.syncope.common.lib.to.AnyTO; +import org.apache.syncope.common.lib.to.AttrTO; import org.apache.syncope.common.lib.to.GroupTO; import org.apache.syncope.common.lib.to.UserTO; import org.apache.wicket.PageReference; @@ -171,4 +174,11 @@ public abstract class AnyWizardBuilder extends AjaxWizardBuilde pageRef); } } + +protected Set cleanEmptyPlainAttrs(final Set plainAttrs) { +Set newPlainAttrs = new HashSet<>(plainAttrs); +plainAttrs.clear(); +plainAttrs.removeIf(attr -> attr.getValues().isEmpty()); +return newPlainAttrs; +} } http://git-wip-us.apache.org/repos/asf/syncope/blob/6a9d5575/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/GroupWizardBuilder.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/GroupWizardBuilder.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/GroupWizardBuilder.java index 2e0d47f..ea4c22e 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/GroupWizardBuilder.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/GroupWizardBuilder.java @@ -91,6 +91,8 @@ public class GroupWizardBuilder extends AnyWizardBuilder implements Gro if (inner.getKey() == null) { result = groupRestClient.create(inner); } else { +inner.getPlainAttrs().clear(); + inner.getPlainAttrs().addAll(cleanEmptyPlainAttrs(inner.getPlainAttrs())); GroupPatch patch = AnyOperations.diff(inner, getOriginalItem().getInnerObject(), false); GroupTO originaObj = getOriginalItem().getInnerObject(); http://git-wip-us.apache.org/repos/asf/syncope/blob/6a9d5575/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/UserWizardBuilder.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/UserWizardBuilder.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/UserWizardBuilder.java index 2a932af..12fd4d9 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/UserWizardBuilder.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/UserWizardBuilder.java @@ -82,6 +82,7 @@ public class UserWizardBuilder extends AnyWizardBuilder implements UserF ? UserWrapper.class.cast(modelObject).isStorePasswordInSyncope()
syncope git commit: [SYNCOPE-1326] Fix Wizard behavior
Repository: syncope Updated Branches: refs/heads/2_0_X 0e3b05025 -> 129006d85 [SYNCOPE-1326] Fix Wizard behavior Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/129006d8 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/129006d8 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/129006d8 Branch: refs/heads/2_0_X Commit: 129006d850c938faf08118fcf6e34ed81875218c Parents: 0e3b050 Author: Marco Di Sabatino Di Diodoro Authored: Fri Jun 22 16:01:29 2018 +0200 Committer: Marco Di Sabatino Di Diodoro Committed: Fri Jun 22 16:03:55 2018 +0200 -- .../console/wizards/any/AnyWizardBuilder.java | 18 ++ .../console/wizards/any/GroupWizardBuilder.java | 2 ++ .../console/wizards/any/UserWizardBuilder.java| 1 + 3 files changed, 21 insertions(+) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/129006d8/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyWizardBuilder.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyWizardBuilder.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyWizardBuilder.java index 2ac9b60..a316510 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyWizardBuilder.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/AnyWizardBuilder.java @@ -18,7 +18,11 @@ */ package org.apache.syncope.client.console.wizards.any; +import java.util.HashSet; import java.util.List; +import java.util.Set; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.collections4.Predicate; import org.apache.syncope.client.console.layout.AbstractAnyFormLayout; import org.apache.syncope.client.console.layout.AnyForm; import org.apache.syncope.client.console.layout.AnyObjectFormLayoutInfo; @@ -27,6 +31,7 @@ import org.apache.syncope.client.console.layout.UserFormLayoutInfo; import org.apache.syncope.client.console.wizards.AjaxWizard; import org.apache.syncope.client.console.wizards.AjaxWizardBuilder; import org.apache.syncope.common.lib.to.AnyTO; +import org.apache.syncope.common.lib.to.AttrTO; import org.apache.syncope.common.lib.to.GroupTO; import org.apache.syncope.common.lib.to.UserTO; import org.apache.wicket.PageReference; @@ -171,4 +176,17 @@ public abstract class AnyWizardBuilder extends AjaxWizardBuilde pageRef); } } + +protected Set cleanEmptyPlainAttrs(final Set plainAttrs) { +Set newPlainAttrs = new HashSet<>(plainAttrs); +plainAttrs.clear(); +CollectionUtils.filterInverse(newPlainAttrs, new Predicate() { + +@Override +public boolean evaluate(final AttrTO attr) { +return attr.getValues().isEmpty(); +} +}); +return newPlainAttrs; +} } http://git-wip-us.apache.org/repos/asf/syncope/blob/129006d8/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/GroupWizardBuilder.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/GroupWizardBuilder.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/GroupWizardBuilder.java index cb46bf1..1d75f9a 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/GroupWizardBuilder.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/GroupWizardBuilder.java @@ -72,6 +72,8 @@ public class GroupWizardBuilder extends AnyWizardBuilder implements Gro if (inner.getKey() == null) { result = groupRestClient.create(inner); } else { +inner.getPlainAttrs().clear(); + inner.getPlainAttrs().addAll(cleanEmptyPlainAttrs(inner.getPlainAttrs())); GroupPatch patch = AnyOperations.diff(inner, getOriginalItem().getInnerObject(), false); GroupTO originaObj = getOriginalItem().getInnerObject(); http://git-wip-us.apache.org/repos/asf/syncope/blob/129006d8/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/UserWizardBuilder.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/UserWizardBuilder.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/UserWizardBuilder.java index cfa78a0..603f7fe 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/UserWizardBuilder.java +++
syncope git commit: [SYNCOPE-1294] PlainSchemaDetailsPanel doesn't display the assigned validator class
Repository: syncope Updated Branches: refs/heads/2_0_X 66579ad93 -> 38327a0a2 [SYNCOPE-1294] PlainSchemaDetailsPanel doesn't display the assigned validator class Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/38327a0a Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/38327a0a Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/38327a0a Branch: refs/heads/2_0_X Commit: 38327a0a23ab3b9869bf65cbcdbc230aa0a0c00c Parents: 66579ad Author: Marco Di Sabatino Di DiodoroAuthored: Wed Apr 4 17:30:57 2018 +0200 Committer: Marco Di Sabatino Di Diodoro Committed: Wed Apr 4 17:30:57 2018 +0200 -- .../client/console/panels/PlainSchemaDetails.java| 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/38327a0a/client/console/src/main/java/org/apache/syncope/client/console/panels/PlainSchemaDetails.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/PlainSchemaDetails.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/PlainSchemaDetails.java index 53b2fc1..dc85323 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/PlainSchemaDetails.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/PlainSchemaDetails.java @@ -62,6 +62,8 @@ public class PlainSchemaDetails extends AbstractSchemaDetailsPanel { private final MultiFieldPanel enumerationKeys; private final AjaxDropDownChoicePanel validatorClass; + +private final AjaxDropDownChoicePanel type; public PlainSchemaDetails( final String id, @@ -69,8 +71,8 @@ public class PlainSchemaDetails extends AbstractSchemaDetailsPanel { final PlainSchemaTO schemaTO) { super(id, pageReference, schemaTO); - -final AjaxDropDownChoicePanel type = new AjaxDropDownChoicePanel<>( + +type = new AjaxDropDownChoicePanel<>( "type", getString("type"), new PropertyModel(schemaTO, "type")); type.setChoices(Arrays.asList(AttrSchemaType.values())); @@ -324,7 +326,6 @@ public class PlainSchemaDetails extends AbstractSchemaDetailsPanel { mimeType.setModelObject(null); mimeType.setChoices(null); -schema.setValidatorClass(null); } else if (AttrSchemaType.Enum.ordinal() == typeOrdinal) { conversionParams.setVisible(false); conversionPattern.setModelObject(null); @@ -350,7 +351,6 @@ public class PlainSchemaDetails extends AbstractSchemaDetailsPanel { mimeType.setModelObject(null); mimeType.setChoices(null); -schema.setValidatorClass(null); } else if (AttrSchemaType.Encrypted.ordinal() == typeOrdinal) { conversionParams.setVisible(false); conversionPattern.setModelObject(null); @@ -374,7 +374,6 @@ public class PlainSchemaDetails extends AbstractSchemaDetailsPanel { mimeType.setModelObject(null); mimeType.setChoices(null); -schema.setValidatorClass(null); } else if (AttrSchemaType.Binary.ordinal() == typeOrdinal) { conversionParams.setVisible(false); conversionPattern.setModelObject(null); @@ -424,7 +423,9 @@ public class PlainSchemaDetails extends AbstractSchemaDetailsPanel { binaryParams.setVisible(false); mimeType.setModelObject(null); mimeType.setChoices(null); +} +if (type.isEnabled() && AttrSchemaType.Binary.ordinal() != typeOrdinal) { schema.setValidatorClass(null); } }
syncope git commit: [SYNCOPE-1294] PlainSchemaDetailsPanel doesn't display the assigned validator class
Repository: syncope Updated Branches: refs/heads/master 0bc714db0 -> 95ee2ffe8 [SYNCOPE-1294] PlainSchemaDetailsPanel doesn't display the assigned validator class Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/95ee2ffe Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/95ee2ffe Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/95ee2ffe Branch: refs/heads/master Commit: 95ee2ffe810336f3bf785e2d231fa15e71630919 Parents: 0bc714d Author: Marco Di Sabatino Di DiodoroAuthored: Wed Apr 4 17:30:57 2018 +0200 Committer: Marco Di Sabatino Di Diodoro Committed: Wed Apr 4 17:48:02 2018 +0200 -- .../client/console/panels/PlainSchemaDetails.java | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/95ee2ffe/client/console/src/main/java/org/apache/syncope/client/console/panels/PlainSchemaDetails.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/PlainSchemaDetails.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/PlainSchemaDetails.java index e62f289..3ec3c62 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/PlainSchemaDetails.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/PlainSchemaDetails.java @@ -67,6 +67,8 @@ public class PlainSchemaDetails extends AbstractSchemaDetailsPanel { private final MultiFieldPanel enumerationKeys; private final AjaxDropDownChoicePanel validator; + +private final AjaxDropDownChoicePanel type; public PlainSchemaDetails( final String id, @@ -74,9 +76,9 @@ public class PlainSchemaDetails extends AbstractSchemaDetailsPanel { final PlainSchemaTO schemaTO) { super(id, pageReference, schemaTO); - -final AjaxDropDownChoicePanel type = new AjaxDropDownChoicePanel<>( -"type", getString("type"), new PropertyModel<>(schemaTO, "type")); + +type = new AjaxDropDownChoicePanel<>( +"type", getString("type"), new PropertyModel(schemaTO, "type")); type.setChoices(Arrays.asList(AttrSchemaType.values())); type.setEnabled(schemaTO == null || schemaTO.getKey() == null || schemaTO.getKey().isEmpty()); @@ -329,8 +331,6 @@ public class PlainSchemaDetails extends AbstractSchemaDetailsPanel { binaryParams.setVisible(false); mimeType.setModelObject(null); mimeType.setChoices(null); - -schema.setValidator(null); } else if (AttrSchemaType.Enum.ordinal() == typeOrdinal) { conversionParams.setVisible(false); conversionPattern.setModelObject(null); @@ -355,8 +355,6 @@ public class PlainSchemaDetails extends AbstractSchemaDetailsPanel { binaryParams.setVisible(false); mimeType.setModelObject(null); mimeType.setChoices(null); - -schema.setValidator(null); } else if (AttrSchemaType.Encrypted.ordinal() == typeOrdinal) { conversionParams.setVisible(false); conversionPattern.setModelObject(null); @@ -379,8 +377,6 @@ public class PlainSchemaDetails extends AbstractSchemaDetailsPanel { binaryParams.setVisible(false); mimeType.setModelObject(null); mimeType.setChoices(null); - -schema.setValidator(null); } else if (AttrSchemaType.Binary.ordinal() == typeOrdinal) { conversionParams.setVisible(false); conversionPattern.setModelObject(null); @@ -430,7 +426,9 @@ public class PlainSchemaDetails extends AbstractSchemaDetailsPanel { binaryParams.setVisible(false); mimeType.setModelObject(null); mimeType.setChoices(null); +} +if (type.isEnabled() && AttrSchemaType.Binary.ordinal() != typeOrdinal) { schema.setValidator(null); } }
syncope git commit: Removed unused variable
Repository: syncope Updated Branches: refs/heads/2_0_X 364bf13a6 -> fc4febae8 Removed unused variable Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/fc4febae Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/fc4febae Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/fc4febae Branch: refs/heads/2_0_X Commit: fc4febae8fae72362e1037ff9bf17bd9983b3e2c Parents: 364bf13 Author: Marco Di Sabatino Di DiodoroAuthored: Wed Mar 28 10:27:31 2018 +0200 Committer: Marco Di Sabatino Di Diodoro Committed: Wed Mar 28 10:27:31 2018 +0200 -- .../java/org/apache/syncope/core/logic/SchemaLogic.java | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/fc4febae/core/logic/src/main/java/org/apache/syncope/core/logic/SchemaLogic.java -- diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/SchemaLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/SchemaLogic.java index 229766e..9c81f4a 100644 --- a/core/logic/src/main/java/org/apache/syncope/core/logic/SchemaLogic.java +++ b/core/logic/src/main/java/org/apache/syncope/core/logic/SchemaLogic.java @@ -306,16 +306,11 @@ public class SchemaLogic extends AbstractTransactionalLogic { protected SchemaTO resolveReference(final Method method, final Object... args) throws UnresolvedReferenceException { -String kind = null; String key = null; if (ArrayUtils.isNotEmpty(args)) { -for (int i = 0; (key == null || kind == null) && i < args.length; i++) { +for (int i = 0; key == null && i < args.length; i++) { if (args[i] instanceof String) { -if (kind == null) { -kind = (String) args[i]; -} else { -key = (String) args[i]; -} +key = (String) args[i]; } else if (args[i] instanceof SchemaTO) { key = ((SchemaTO) args[i]).getKey(); }
syncope git commit: Removed unused variable
Repository: syncope Updated Branches: refs/heads/master 2dda89d21 -> 59a3422e4 Removed unused variable Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/59a3422e Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/59a3422e Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/59a3422e Branch: refs/heads/master Commit: 59a3422e4f1b2ee758590aead03c085a8e1b79b1 Parents: 2dda89d Author: Marco Di Sabatino Di DiodoroAuthored: Wed Mar 28 10:27:31 2018 +0200 Committer: Marco Di Sabatino Di Diodoro Committed: Wed Mar 28 10:28:35 2018 +0200 -- .../java/org/apache/syncope/core/logic/SchemaLogic.java | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/59a3422e/core/logic/src/main/java/org/apache/syncope/core/logic/SchemaLogic.java -- diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/SchemaLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/SchemaLogic.java index f1ce6ff..d9cfafa 100644 --- a/core/logic/src/main/java/org/apache/syncope/core/logic/SchemaLogic.java +++ b/core/logic/src/main/java/org/apache/syncope/core/logic/SchemaLogic.java @@ -301,16 +301,11 @@ public class SchemaLogic extends AbstractTransactionalLogic { protected SchemaTO resolveReference(final Method method, final Object... args) throws UnresolvedReferenceException { -String kind = null; String key = null; if (ArrayUtils.isNotEmpty(args)) { -for (int i = 0; (key == null || kind == null) && i < args.length; i++) { +for (int i = 0; key == null && i < args.length; i++) { if (args[i] instanceof String) { -if (kind == null) { -kind = (String) args[i]; -} else { -key = (String) args[i]; -} +key = (String) args[i]; } else if (args[i] instanceof SchemaTO) { key = ((SchemaTO) args[i]).getKey(); }
syncope git commit: Fixed NullPointer message when logs are in debug mode
Repository: syncope Updated Branches: refs/heads/1_2_X 3b9ef4107 -> 1ed1bee11 Fixed NullPointer message when logs are in debug mode Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/1ed1bee1 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/1ed1bee1 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/1ed1bee1 Branch: refs/heads/1_2_X Commit: 1ed1bee1112dc10f2b67a2ba285a3c9fceacb42b Parents: 3b9ef41 Author: Marco Di Sabatino Di DiodoroAuthored: Wed Mar 28 10:17:21 2018 +0200 Committer: Marco Di Sabatino Di Diodoro Committed: Wed Mar 28 10:17:21 2018 +0200 -- .../syncope/core/rest/controller/SchemaController.java | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/1ed1bee1/core/src/main/java/org/apache/syncope/core/rest/controller/SchemaController.java -- diff --git a/core/src/main/java/org/apache/syncope/core/rest/controller/SchemaController.java b/core/src/main/java/org/apache/syncope/core/rest/controller/SchemaController.java index 69a41c9..bd9e1dd 100644 --- a/core/src/main/java/org/apache/syncope/core/rest/controller/SchemaController.java +++ b/core/src/main/java/org/apache/syncope/core/rest/controller/SchemaController.java @@ -280,13 +280,11 @@ public class SchemaController extends AbstractTransactionalController if (ArrayUtils.isNotEmpty(args)) { for (int i = 0; (name == null || kind == null) && i < args.length; i++) { if (args[i] instanceof String) { -if (kind == null) { -kind = (String) args[i]; -} else { -name = (String) args[i]; -} +name = (String) args[i]; } else if (args[i] instanceof SchemaTO) { name = ((SchemaTO) args[i]).getName(); +} else if (args[i] instanceof AttributableType) { +kind = ((AttributableType) args[i]).name(); } } }
syncope git commit: [SYNCOPE-1275] Added the possibility to delete a scheduled job
Repository: syncope Updated Branches: refs/heads/2_0_X 501f4de36 -> eb2655ce4 [SYNCOPE-1275] Added the possibility to delete a scheduled job Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/eb2655ce Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/eb2655ce Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/eb2655ce Branch: refs/heads/2_0_X Commit: eb2655ce47abe8cae42a2b848fd75a8d1ef0c804 Parents: 501f4de Author: Marco Di Sabatino Di DiodoroAuthored: Wed Feb 21 12:55:25 2018 +0100 Committer: Marco Di Sabatino Di Diodoro Committed: Wed Feb 21 12:55:25 2018 +0100 -- .../client/console/widgets/JobWidget.java | 49 .../syncope/common/lib/types/JobAction.java | 3 +- .../syncope/core/logic/AbstractJobLogic.java| 4 ++ 3 files changed, 55 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/eb2655ce/client/console/src/main/java/org/apache/syncope/client/console/widgets/JobWidget.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/widgets/JobWidget.java b/client/console/src/main/java/org/apache/syncope/client/console/widgets/JobWidget.java index b41e174..53c5c5d 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/widgets/JobWidget.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/widgets/JobWidget.java @@ -18,6 +18,8 @@ */ package org.apache.syncope.client.console.widgets; +import static org.apache.wicket.Component.ENABLE; + import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal; import de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel; import java.io.Serializable; @@ -28,8 +30,10 @@ import java.util.Iterator; import java.util.List; import org.apache.commons.lang3.StringUtils; import org.apache.syncope.client.console.SyncopeConsoleSession; +import org.apache.syncope.client.console.commons.Constants; import org.apache.syncope.client.console.commons.DirectoryDataProvider; import org.apache.syncope.client.console.commons.SortableDataProviderComparator; +import org.apache.syncope.client.console.pages.BasePage; import org.apache.syncope.client.console.panels.DirectoryPanel; import org.apache.syncope.client.console.panels.ExecMessageModal; import org.apache.syncope.client.console.reports.ReportWizardBuilder; @@ -49,11 +53,13 @@ import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksTogg import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel; import org.apache.syncope.client.console.wizards.AjaxWizard; import org.apache.syncope.client.console.wizards.WizardMgtPanel; +import org.apache.syncope.common.lib.SyncopeClientException; import org.apache.syncope.common.lib.to.ExecTO; import org.apache.syncope.common.lib.to.JobTO; import org.apache.syncope.common.lib.to.ReportTO; import org.apache.syncope.common.lib.to.ProvisioningTaskTO; import org.apache.syncope.common.lib.to.PullTaskTO; +import org.apache.syncope.common.lib.types.JobAction; import org.apache.syncope.common.lib.types.JobType; import org.apache.syncope.common.lib.types.StandardEntitlement; import org.apache.syncope.common.lib.types.TaskType; @@ -488,6 +494,49 @@ public class JobWidget extends BaseWidget { }, ActionType.COMPOSE, StandardEntitlement.TASK_UPDATE); +panel.add(new ActionLink() { + +private static final long serialVersionUID = -3722207913631435501L; + +@Override +public void onClick(final AjaxRequestTarget target, final JobTO ignore) { +try { +if (null != jobTO.getType()) { +switch (jobTO.getType()) { + +case NOTIFICATION: +break; + +case REPORT: +new ReportRestClient().actionJob(jobTO.getRefKey(), JobAction.DELETE); +break; + +case TASK: +new TaskRestClient().actionJob(jobTO.getRefKey(), JobAction.DELETE); +break; + +default: +break; +} + SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED)); +target.add(container); +} +} catch (SyncopeClientException e) { +
syncope git commit: [SYNCOPE-1275] Added the possibility to delete a scheduled job
Repository: syncope Updated Branches: refs/heads/master 78cd2eba4 -> 0ee44d88c [SYNCOPE-1275] Added the possibility to delete a scheduled job Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/0ee44d88 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/0ee44d88 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/0ee44d88 Branch: refs/heads/master Commit: 0ee44d88c519da839d0310bc6c1d74d9376054fc Parents: 78cd2eb Author: Marco Di Sabatino Di DiodoroAuthored: Wed Feb 21 12:55:25 2018 +0100 Committer: Marco Di Sabatino Di Diodoro Committed: Wed Feb 21 12:57:34 2018 +0100 -- .../client/console/widgets/JobWidget.java | 49 .../syncope/common/lib/types/JobAction.java | 3 +- .../syncope/core/logic/AbstractJobLogic.java| 4 ++ 3 files changed, 55 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/0ee44d88/client/console/src/main/java/org/apache/syncope/client/console/widgets/JobWidget.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/widgets/JobWidget.java b/client/console/src/main/java/org/apache/syncope/client/console/widgets/JobWidget.java index 5e4a9d5..a26da84 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/widgets/JobWidget.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/widgets/JobWidget.java @@ -18,6 +18,8 @@ */ package org.apache.syncope.client.console.widgets; +import static org.apache.wicket.Component.ENABLE; + import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal; import de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel; import java.io.Serializable; @@ -28,8 +30,10 @@ import java.util.Iterator; import java.util.List; import org.apache.commons.lang3.StringUtils; import org.apache.syncope.client.console.SyncopeConsoleSession; +import org.apache.syncope.client.console.commons.Constants; import org.apache.syncope.client.console.commons.DirectoryDataProvider; import org.apache.syncope.client.console.commons.SortableDataProviderComparator; +import org.apache.syncope.client.console.pages.BasePage; import org.apache.syncope.client.console.panels.DirectoryPanel; import org.apache.syncope.client.console.panels.ExecMessageModal; import org.apache.syncope.client.console.reports.ReportWizardBuilder; @@ -49,11 +53,13 @@ import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksTogg import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel; import org.apache.syncope.client.console.wizards.AjaxWizard; import org.apache.syncope.client.console.wizards.WizardMgtPanel; +import org.apache.syncope.common.lib.SyncopeClientException; import org.apache.syncope.common.lib.to.ExecTO; import org.apache.syncope.common.lib.to.JobTO; import org.apache.syncope.common.lib.to.ReportTO; import org.apache.syncope.common.lib.to.ProvisioningTaskTO; import org.apache.syncope.common.lib.to.PullTaskTO; +import org.apache.syncope.common.lib.types.JobAction; import org.apache.syncope.common.lib.types.JobType; import org.apache.syncope.common.lib.types.StandardEntitlement; import org.apache.syncope.common.lib.types.TaskType; @@ -488,6 +494,49 @@ public class JobWidget extends BaseWidget { }, ActionType.COMPOSE, StandardEntitlement.TASK_UPDATE); +panel.add(new ActionLink() { + +private static final long serialVersionUID = -3722207913631435501L; + +@Override +public void onClick(final AjaxRequestTarget target, final JobTO ignore) { +try { +if (null != jobTO.getType()) { +switch (jobTO.getType()) { + +case NOTIFICATION: +break; + +case REPORT: +new ReportRestClient().actionJob(jobTO.getRefKey(), JobAction.DELETE); +break; + +case TASK: +new TaskRestClient().actionJob(jobTO.getRefKey(), JobAction.DELETE); +break; + +default: +break; +} + SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED)); +target.add(container); +} +} catch (SyncopeClientException e) { +
syncope git commit: [SYNCOPE-1272] Set browser cache duration to NONE for ResourceStreamRequestHandler
Repository: syncope Updated Branches: refs/heads/master 2746a6f93 -> be4f145f9 [SYNCOPE-1272] Set browser cache duration to NONE for ResourceStreamRequestHandler Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/be4f145f Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/be4f145f Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/be4f145f Branch: refs/heads/master Commit: be4f145f917117f9d69e084433d90ca56691d870 Parents: 2746a6f Author: Marco Di Sabatino Di DiodoroAuthored: Mon Feb 12 11:38:18 2018 +0100 Committer: Marco Di Sabatino Di Diodoro Committed: Mon Feb 12 11:40:29 2018 +0100 -- .../java/org/apache/syncope/client/console/pages/BasePage.java | 2 ++ .../console/wicket/ajax/form/AbstractAjaxDownloadBehavior.java | 4 +++- .../client/console/wicket/markup/html/form/AjaxDownload.java | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/be4f145f/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java index 0cff36c..ebb14f2 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java @@ -64,6 +64,7 @@ import org.apache.wicket.markup.html.list.ListView; import org.apache.wicket.request.handler.resource.ResourceStreamRequestHandler; import org.apache.wicket.request.mapper.parameter.PageParameters; import org.apache.wicket.request.resource.ContentDisposition; +import org.apache.wicket.util.time.Duration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -135,6 +136,7 @@ public class BasePage extends WebPage implements IAjaxIndicatorAware { ? SyncopeConsoleSession.get().getDomain() + "Content.xml" : stream.getFilename()); rsrh.setContentDisposition(ContentDisposition.ATTACHMENT); +rsrh.setCacheDuration(Duration.NONE); getRequestCycle().scheduleRequestHandlerAfterCurrent(rsrh); } catch (Exception e) { http://git-wip-us.apache.org/repos/asf/syncope/blob/be4f145f/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/form/AbstractAjaxDownloadBehavior.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/form/AbstractAjaxDownloadBehavior.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/form/AbstractAjaxDownloadBehavior.java index 9342c7d..004f7c8 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/form/AbstractAjaxDownloadBehavior.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/form/AbstractAjaxDownloadBehavior.java @@ -22,6 +22,7 @@ import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.behavior.AbstractAjaxBehavior; import org.apache.wicket.request.handler.resource.ResourceStreamRequestHandler; import org.apache.wicket.util.resource.IResourceStream; +import org.apache.wicket.util.time.Duration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -45,7 +46,8 @@ public abstract class AbstractAjaxDownloadBehavior extends AbstractAjaxBehavior public void onRequest() { try { getComponent().getRequestCycle().scheduleRequestHandlerAfterCurrent( -new ResourceStreamRequestHandler(getResourceStream(), getFileName())); +new ResourceStreamRequestHandler( +getResourceStream(), getFileName()).setCacheDuration(Duration.NONE)); } catch (Exception e) { // cannot be notifies beacause the use of scheduleRequestHandlerAfterCurrent LOG.error("Error downloading file", e); http://git-wip-us.apache.org/repos/asf/syncope/blob/be4f145f/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDownload.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDownload.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDownload.java index da27e2b..6ede95f 100644 ---
syncope git commit: [SYNCOPE-1272] Set browser cache duration to NONE for ResourceStreamRequestHandler
Repository: syncope Updated Branches: refs/heads/2_0_X 2a770 -> e3760ec00 [SYNCOPE-1272] Set browser cache duration to NONE for ResourceStreamRequestHandler Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/e3760ec0 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/e3760ec0 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/e3760ec0 Branch: refs/heads/2_0_X Commit: e3760ec0076139e307a1a21adced73a66e088171 Parents: 2a7 Author: Marco Di Sabatino Di DiodoroAuthored: Mon Feb 12 11:38:18 2018 +0100 Committer: Marco Di Sabatino Di Diodoro Committed: Mon Feb 12 11:38:18 2018 +0100 -- .../java/org/apache/syncope/client/console/pages/BasePage.java | 2 ++ .../console/wicket/ajax/form/AbstractAjaxDownloadBehavior.java | 4 +++- .../client/console/wicket/markup/html/form/AjaxDownload.java | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/e3760ec0/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java index e8f1fb9..59659a2 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java @@ -64,6 +64,7 @@ import org.apache.wicket.markup.html.list.ListView; import org.apache.wicket.request.handler.resource.ResourceStreamRequestHandler; import org.apache.wicket.request.mapper.parameter.PageParameters; import org.apache.wicket.request.resource.ContentDisposition; +import org.apache.wicket.util.time.Duration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -135,6 +136,7 @@ public class BasePage extends WebPage implements IAjaxIndicatorAware { ? SyncopeConsoleSession.get().getDomain() + "Content.xml" : stream.getFilename()); rsrh.setContentDisposition(ContentDisposition.ATTACHMENT); +rsrh.setCacheDuration(Duration.NONE); getRequestCycle().scheduleRequestHandlerAfterCurrent(rsrh); } catch (Exception e) { http://git-wip-us.apache.org/repos/asf/syncope/blob/e3760ec0/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/form/AbstractAjaxDownloadBehavior.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/form/AbstractAjaxDownloadBehavior.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/form/AbstractAjaxDownloadBehavior.java index 9342c7d..004f7c8 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/form/AbstractAjaxDownloadBehavior.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/ajax/form/AbstractAjaxDownloadBehavior.java @@ -22,6 +22,7 @@ import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.behavior.AbstractAjaxBehavior; import org.apache.wicket.request.handler.resource.ResourceStreamRequestHandler; import org.apache.wicket.util.resource.IResourceStream; +import org.apache.wicket.util.time.Duration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -45,7 +46,8 @@ public abstract class AbstractAjaxDownloadBehavior extends AbstractAjaxBehavior public void onRequest() { try { getComponent().getRequestCycle().scheduleRequestHandlerAfterCurrent( -new ResourceStreamRequestHandler(getResourceStream(), getFileName())); +new ResourceStreamRequestHandler( +getResourceStream(), getFileName()).setCacheDuration(Duration.NONE)); } catch (Exception e) { // cannot be notifies beacause the use of scheduleRequestHandlerAfterCurrent LOG.error("Error downloading file", e); http://git-wip-us.apache.org/repos/asf/syncope/blob/e3760ec0/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDownload.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDownload.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDownload.java index da27e2b..6ede95f 100644 ---
syncope git commit: Disabling an entity only on resources always changes the status on syncope
Repository: syncope Updated Branches: refs/heads/2_0_X 2121d2f0d -> 87e4ff51f Disabling an entity only on resources always changes the status on syncope Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/87e4ff51 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/87e4ff51 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/87e4ff51 Branch: refs/heads/2_0_X Commit: 87e4ff51f7acde43b4ece9b00769c63922ba7827 Parents: 2121d2f Author: Marco Di Sabatino Di DiodoroAuthored: Thu Jan 18 10:04:17 2018 +0100 Committer: Marco Di Sabatino Di Diodoro Committed: Thu Jan 18 10:04:17 2018 +0100 -- .../apache/syncope/client/console/commons/status/StatusUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/87e4ff51/client/console/src/main/java/org/apache/syncope/client/console/commons/status/StatusUtils.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/status/StatusUtils.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/status/StatusUtils.java index 77a8ef9..9828b0c 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/commons/status/StatusUtils.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/status/StatusUtils.java @@ -170,7 +170,7 @@ public class StatusUtils implements Serializable { public static StatusPatch buildStatusPatch(final Collection statuses, final Boolean enable) { StatusPatch.Builder builder = new StatusPatch.Builder(); - +builder.onSyncope(false); for (StatusBean status : statuses) { if ("syncope".equalsIgnoreCase(status.getResource())) { builder.onSyncope(true);
syncope git commit: Disabling an entity only on resources always changes the status on syncope
Repository: syncope Updated Branches: refs/heads/master 810c976ae -> ec9769cc8 Disabling an entity only on resources always changes the status on syncope Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/ec9769cc Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/ec9769cc Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/ec9769cc Branch: refs/heads/master Commit: ec9769cc879607bc33d8173eb3a38543dd26cdfe Parents: 810c976 Author: Marco Di Sabatino Di DiodoroAuthored: Thu Jan 18 10:04:17 2018 +0100 Committer: Marco Di Sabatino Di Diodoro Committed: Thu Jan 18 10:26:25 2018 +0100 -- .../apache/syncope/client/console/commons/status/StatusUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/ec9769cc/client/console/src/main/java/org/apache/syncope/client/console/commons/status/StatusUtils.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/status/StatusUtils.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/status/StatusUtils.java index 54b093e..608dee1 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/commons/status/StatusUtils.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/status/StatusUtils.java @@ -171,7 +171,7 @@ public class StatusUtils implements Serializable { public static StatusPatch buildStatusPatch(final Collection statuses, final Boolean enable) { StatusPatch.Builder builder = new StatusPatch.Builder(); - +builder.onSyncope(false); for (StatusBean status : statuses) { if ("syncope".equalsIgnoreCase(status.getResource())) { builder.onSyncope(true);
syncope git commit: [SYNCOPE-1251] Fix Update Activiti service task
Repository: syncope Updated Branches: refs/heads/2_0_X 9405d6cc7 -> afc353944 [SYNCOPE-1251] Fix Update Activiti service task Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/afc35394 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/afc35394 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/afc35394 Branch: refs/heads/2_0_X Commit: afc353944f13d2d124b89ee317b1f50df6667d90 Parents: 9405d6c Author: Marco Di Sabatino Di DiodoroAuthored: Thu Dec 14 14:06:50 2017 +0100 Committer: Marco Di Sabatino Di Diodoro Committed: Thu Dec 14 14:06:50 2017 +0100 -- .../client/console/approvals/ApprovalDirectoryPanel.java | 7 +-- .../apache/syncope/core/workflow/activiti/task/Update.java| 1 + .../apache/syncope/core/workflow/flowable/task/Update.java| 1 + 3 files changed, 7 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/afc35394/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDirectoryPanel.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDirectoryPanel.java index f43bcaf..5009635 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDirectoryPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDirectoryPanel.java @@ -214,7 +214,7 @@ public class ApprovalDirectoryPanel previousUserTO = formTO.getUserTO(); formTO.getUserTO().setKey(formTO.getUserPatch().getKey()); formTO.getUserTO().setPassword(null); -newUserTO = AnyOperations.patch(formTO.getUserTO(), formTO.getUserPatch()); +newUserTO = AnyOperations.patch(formTO.getUserTO(), formTO.getUserPatch()); } AjaxWizard.EditItemActionEvent editItemActionEvent = @@ -352,7 +352,10 @@ public class ApprovalDirectoryPanel actual.setEntity(inner); } else { actual = userRestClient.update(getOriginalItem().getInnerObject().getETagValue(), patch); - claimForm(restClient.getFormForUser(actual.getEntity().getKey()).getTaskId()); +WorkflowFormTO workFlowTO = restClient.getFormForUser(actual.getEntity().getKey()); +if (workFlowTO != null) { +claimForm(workFlowTO.getTaskId()); +} } } http://git-wip-us.apache.org/repos/asf/syncope/blob/afc35394/core/workflow-activiti/src/main/java/org/apache/syncope/core/workflow/activiti/task/Update.java -- diff --git a/core/workflow-activiti/src/main/java/org/apache/syncope/core/workflow/activiti/task/Update.java b/core/workflow-activiti/src/main/java/org/apache/syncope/core/workflow/activiti/task/Update.java index ab1edba..e769871 100644 --- a/core/workflow-activiti/src/main/java/org/apache/syncope/core/workflow/activiti/task/Update.java +++ b/core/workflow-activiti/src/main/java/org/apache/syncope/core/workflow/activiti/task/Update.java @@ -63,6 +63,7 @@ public class Update extends AbstractActivitiServiceTask { // report updated user and propagation by resource as result engine.getRuntimeService().setVariable(executionId, ActivitiUserWorkflowAdapter.USER, user); +engine.getRuntimeService().setVariable(executionId, ActivitiUserWorkflowAdapter.USER_TO, updated); engine.getRuntimeService().setVariable(executionId, ActivitiUserWorkflowAdapter.USER_PATCH, userPatch); engine.getRuntimeService().setVariable(executionId, ActivitiUserWorkflowAdapter.PROP_BY_RESOURCE, propByRes); } http://git-wip-us.apache.org/repos/asf/syncope/blob/afc35394/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/Update.java -- diff --git a/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/Update.java b/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/Update.java index e9ed279..c619211 100644 --- a/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/Update.java +++ b/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/Update.java @@ -63,6 +63,7 @@ public class Update extends AbstractFlowableServiceTask {
syncope git commit: [SYNCOPE-1251] Fix Update Activiti service task
Repository: syncope Updated Branches: refs/heads/master e2f369399 -> 265b2a7d7 [SYNCOPE-1251] Fix Update Activiti service task Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/265b2a7d Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/265b2a7d Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/265b2a7d Branch: refs/heads/master Commit: 265b2a7d7b72634716c58be8d9890a0244888367 Parents: e2f3693 Author: Marco Di Sabatino Di DiodoroAuthored: Thu Dec 14 14:06:50 2017 +0100 Committer: Marco Di Sabatino Di Diodoro Committed: Thu Dec 14 14:08:23 2017 +0100 -- .../client/console/approvals/ApprovalDirectoryPanel.java | 7 +-- .../apache/syncope/core/workflow/flowable/task/Update.java| 1 + 2 files changed, 6 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/265b2a7d/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDirectoryPanel.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDirectoryPanel.java index 51f71eb..b694ee1 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDirectoryPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDirectoryPanel.java @@ -214,7 +214,7 @@ public class ApprovalDirectoryPanel previousUserTO = formTO.getUserTO(); formTO.getUserTO().setKey(formTO.getUserPatch().getKey()); formTO.getUserTO().setPassword(null); -newUserTO = AnyOperations.patch(formTO.getUserTO(), formTO.getUserPatch()); +newUserTO = AnyOperations.patch(formTO.getUserTO(), formTO.getUserPatch()); } AjaxWizard.EditItemActionEvent editItemActionEvent = @@ -352,7 +352,10 @@ public class ApprovalDirectoryPanel actual.setEntity(inner); } else { actual = userRestClient.update(getOriginalItem().getInnerObject().getETagValue(), patch); - claimForm(restClient.getFormForUser(actual.getEntity().getKey()).getTaskId()); +WorkflowFormTO workFlowTO = restClient.getFormForUser(actual.getEntity().getKey()); +if (workFlowTO != null) { +claimForm(workFlowTO.getTaskId()); +} } } http://git-wip-us.apache.org/repos/asf/syncope/blob/265b2a7d/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/Update.java -- diff --git a/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/Update.java b/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/Update.java index e9ed279..c619211 100644 --- a/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/Update.java +++ b/core/workflow-flowable/src/main/java/org/apache/syncope/core/workflow/flowable/task/Update.java @@ -63,6 +63,7 @@ public class Update extends AbstractFlowableServiceTask { // report updated user and propagation by resource as result engine.getRuntimeService().setVariable(executionId, FlowableUserWorkflowAdapter.USER, user); +engine.getRuntimeService().setVariable(executionId, FlowableUserWorkflowAdapter.USER_TO, updated); engine.getRuntimeService().setVariable(executionId, FlowableUserWorkflowAdapter.USER_PATCH, userPatch); engine.getRuntimeService().setVariable(executionId, FlowableUserWorkflowAdapter.PROP_BY_RESOURCE, propByRes); }
syncope git commit: [SYNCOPE-1248] Fix update user during approval process
Repository: syncope Updated Branches: refs/heads/2_0_X a28d85dba -> 227642a63 [SYNCOPE-1248] Fix update user during approval process Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/227642a6 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/227642a6 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/227642a6 Branch: refs/heads/2_0_X Commit: 227642a632a4f1c75d1bb88d18a22d025c094694 Parents: a28d85d Author: Marco Di Sabatino Di DiodoroAuthored: Tue Dec 12 01:19:51 2017 +0100 Committer: Marco Di Sabatino Di Diodoro Committed: Tue Dec 12 01:20:11 2017 +0100 -- .../client/console/approvals/ApprovalDirectoryPanel.java| 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/227642a6/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDirectoryPanel.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDirectoryPanel.java index 80e216d..f43bcaf 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDirectoryPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDirectoryPanel.java @@ -211,9 +211,10 @@ public class ApprovalDirectoryPanel previousUserTO.setKey(formTO.getUserPatch().getKey()); newUserTO = AnyOperations.patch(previousUserTO, formTO.getUserPatch()); } else { -formTO.getUserTO().setKey(formTO.getUserPatch().getKey()); -newUserTO = AnyOperations.patch(formTO.getUserTO(), formTO.getUserPatch()); previousUserTO = formTO.getUserTO(); +formTO.getUserTO().setKey(formTO.getUserPatch().getKey()); +formTO.getUserTO().setPassword(null); +newUserTO = AnyOperations.patch(formTO.getUserTO(), formTO.getUserPatch()); } AjaxWizard.EditItemActionEvent editItemActionEvent =
syncope git commit: [SYNCOPE-1248] Fix update user during approval process
Repository: syncope Updated Branches: refs/heads/master c2c06a985 -> 870413071 [SYNCOPE-1248] Fix update user during approval process Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/87041307 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/87041307 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/87041307 Branch: refs/heads/master Commit: 87041307148d79b78a81ba0819f16bdc8a2401de Parents: c2c06a9 Author: Marco Di Sabatino Di DiodoroAuthored: Tue Dec 12 01:19:51 2017 +0100 Committer: Marco Di Sabatino Di Diodoro Committed: Tue Dec 12 01:21:28 2017 +0100 -- .../client/console/approvals/ApprovalDirectoryPanel.java| 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/87041307/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDirectoryPanel.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDirectoryPanel.java index af91834..51f71eb 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDirectoryPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDirectoryPanel.java @@ -211,9 +211,10 @@ public class ApprovalDirectoryPanel previousUserTO.setKey(formTO.getUserPatch().getKey()); newUserTO = AnyOperations.patch(previousUserTO, formTO.getUserPatch()); } else { -formTO.getUserTO().setKey(formTO.getUserPatch().getKey()); -newUserTO = AnyOperations.patch(formTO.getUserTO(), formTO.getUserPatch()); previousUserTO = formTO.getUserTO(); +formTO.getUserTO().setKey(formTO.getUserPatch().getKey()); +formTO.getUserTO().setPassword(null); +newUserTO = AnyOperations.patch(formTO.getUserTO(), formTO.getUserPatch()); } AjaxWizard.EditItemActionEvent editItemActionEvent =
syncope git commit: Improved the reading of the fields of a bean for the building of the form
Repository: syncope Updated Branches: refs/heads/2_0_X aa25af970 -> a95ff2380 Improved the reading of the fields of a bean for the building of the form Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/a95ff238 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/a95ff238 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/a95ff238 Branch: refs/heads/2_0_X Commit: a95ff23803fe689007622e7b5e5023a0e5018a11 Parents: aa25af9 Author: Marco Di Sabatino Di DiodoroAuthored: Mon Oct 30 15:41:19 2017 +0100 Committer: Marco Di Sabatino Di Diodoro Committed: Mon Oct 30 15:41:19 2017 +0100 -- .../client/console/panels/BeanPanel.java| 27 1 file changed, 16 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/a95ff238/client/console/src/main/java/org/apache/syncope/client/console/panels/BeanPanel.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/BeanPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/BeanPanel.java index c09fb43..56c897d 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/BeanPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/BeanPanel.java @@ -65,6 +65,9 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.BeanWrapper; import org.springframework.beans.PropertyAccessorFactory; import org.springframework.util.ClassUtils; +import org.springframework.util.ReflectionUtils; +import org.springframework.util.ReflectionUtils.FieldCallback; +import org.springframework.util.ReflectionUtils.FieldFilter; public class BeanPanel extends Panel { @@ -100,16 +103,23 @@ public class BeanPanel extends Panel { @Override protected List load() { -List result = new ArrayList<>(); +final List result = new ArrayList<>(); if (BeanPanel.this.getDefaultModelObject() != null) { -for (Field field : BeanPanel.this.getDefaultModelObject().getClass().getDeclaredFields()) { -if (!BeanPanel.this.excluded.contains(field.getName())) { + ReflectionUtils.doWithFields(BeanPanel.this.getDefaultModelObject().getClass(), +new FieldCallback() { + +public void doWith(final Field field) throws IllegalArgumentException, IllegalAccessException { result.add(field.getName()); } -} -} +}, new FieldFilter() { + +public boolean matches(final Field field) { +return !BeanPanel.this.excluded.contains(field.getName()); +} +}); +} return result; } }; @@ -125,12 +135,7 @@ public class BeanPanel extends Panel { item.add(new Label("fieldName", new ResourceModel(fieldName, fieldName))); -Field field = null; -try { -field = bean.getObject().getClass().getDeclaredField(fieldName); -} catch (NoSuchFieldException | SecurityException e) { -LOG.error("Could not find field {} in class {}", fieldName, bean.getObject().getClass(), e); -} +Field field = ReflectionUtils.findField(bean.getObject().getClass(), fieldName); if (field == null) { return;
syncope git commit: Improved the reading of the fields of a bean for the building of the form
Repository: syncope Updated Branches: refs/heads/master bc3c6e616 -> 5697a5f90 Improved the reading of the fields of a bean for the building of the form Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/5697a5f9 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/5697a5f9 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/5697a5f9 Branch: refs/heads/master Commit: 5697a5f90a9e26547012f37040efff1eba90ba34 Parents: bc3c6e6 Author: Marco Di Sabatino Di DiodoroAuthored: Mon Oct 30 15:41:19 2017 +0100 Committer: Marco Di Sabatino Di Diodoro Committed: Mon Oct 30 15:44:34 2017 +0100 -- .../client/console/panels/BeanPanel.java| 27 1 file changed, 16 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/5697a5f9/client/console/src/main/java/org/apache/syncope/client/console/panels/BeanPanel.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/BeanPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/BeanPanel.java index 96ee931..cc8d75d 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/BeanPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/BeanPanel.java @@ -65,6 +65,9 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.BeanWrapper; import org.springframework.beans.PropertyAccessorFactory; import org.springframework.util.ClassUtils; +import org.springframework.util.ReflectionUtils; +import org.springframework.util.ReflectionUtils.FieldCallback; +import org.springframework.util.ReflectionUtils.FieldFilter; public class BeanPanel extends Panel { @@ -100,16 +103,23 @@ public class BeanPanel extends Panel { @Override protected List load() { -List result = new ArrayList<>(); +final List result = new ArrayList<>(); if (BeanPanel.this.getDefaultModelObject() != null) { -for (Field field : BeanPanel.this.getDefaultModelObject().getClass().getDeclaredFields()) { -if (!BeanPanel.this.excluded.contains(field.getName())) { + ReflectionUtils.doWithFields(BeanPanel.this.getDefaultModelObject().getClass(), +new FieldCallback() { + +public void doWith(final Field field) throws IllegalArgumentException, IllegalAccessException { result.add(field.getName()); } -} -} +}, new FieldFilter() { + +public boolean matches(final Field field) { +return !BeanPanel.this.excluded.contains(field.getName()); +} +}); +} return result; } }; @@ -125,12 +135,7 @@ public class BeanPanel extends Panel { item.add(new Label("fieldName", new ResourceModel(fieldName, fieldName))); -Field field = null; -try { -field = bean.getObject().getClass().getDeclaredField(fieldName); -} catch (NoSuchFieldException | SecurityException e) { -LOG.error("Could not find field {} in class {}", fieldName, bean.getObject().getClass(), e); -} +Field field = ReflectionUtils.findField(bean.getObject().getClass(), fieldName); if (field == null) { return;
syncope git commit: Add a missing try/catch
Repository: syncope Updated Branches: refs/heads/2_0_X 6f4af4163 -> c0235635a Add a missing try/catch Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/c0235635 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/c0235635 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/c0235635 Branch: refs/heads/2_0_X Commit: c0235635ae53f08f4993ac2798354029ec7b352c Parents: 6f4af41 Author: Marco Di Sabatino Di DiodoroAuthored: Thu Jun 29 12:40:48 2017 +0200 Committer: Marco Di Sabatino Di Diodoro Committed: Thu Jun 29 12:40:48 2017 +0200 -- .../resources/ResourceProvisionPanel.java | 31 1 file changed, 19 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/c0235635/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel.java index 7bc48d0..28b4605 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel.java @@ -42,6 +42,7 @@ import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPan import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel; import org.apache.syncope.client.console.wizards.AjaxWizard; import org.apache.syncope.client.console.wizards.WizardMgtPanel; +import org.apache.syncope.common.lib.SyncopeClientException; import org.apache.syncope.common.lib.to.MappingItemTO; import org.apache.syncope.common.lib.to.ProvisionTO; import org.apache.syncope.common.lib.to.ResourceTO; @@ -219,20 +220,26 @@ public class ResourceProvisionPanel extends AbstractModalPanel { builder.includes("anyType", "objectClass", "auxClasses"); builder.setReuseItem(false); -builder. -addAction(new ActionLink() { +builder.addAction(new ActionLink() { -private static final long serialVersionUID = -3722207913631435504L; +private static final long serialVersionUID = -3722207913631435504L; -@Override -public void onClick(final AjaxRequestTarget target, final ProvisionTO provisionTO) { -send(ResourceProvisionPanel.this, Broadcast.DEPTH, -new AjaxWizard.NewItemActionEvent<>(provisionTO, 2, target).setResourceModel( -new StringResourceModel("inner.provision.mapping", -ResourceProvisionPanel.this, -Model.of(provisionTO; -} -}, ActionLink.ActionType.MAPPING, StandardEntitlement.RESOURCE_UPDATE). +@Override +public void onClick(final AjaxRequestTarget target, final ProvisionTO provisionTO) { +try { +send(ResourceProvisionPanel.this, Broadcast.DEPTH, +new AjaxWizard.NewItemActionEvent<>(provisionTO, 2, target).setResourceModel( +new StringResourceModel("inner.provision.mapping", +ResourceProvisionPanel.this, +Model.of(provisionTO; +} catch (SyncopeClientException e) { +LOG.error("While contacting resource", e); +SyncopeConsoleSession.get().error( +StringUtils.isBlank(e.getMessage()) ? e.getClass().getName() : e.getMessage()); +((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target); +} +} +}, ActionLink.ActionType.MAPPING, StandardEntitlement.RESOURCE_UPDATE). addAction(new ActionLink() { private static final long serialVersionUID = -7780999687733432439L;
syncope git commit: Add a missing try/catch
Repository: syncope Updated Branches: refs/heads/master 3ceb8b597 -> e19910c2e Add a missing try/catch Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/e19910c2 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/e19910c2 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/e19910c2 Branch: refs/heads/master Commit: e19910c2e011b7066f8cd259483603fdf889ec85 Parents: 3ceb8b5 Author: Marco Di Sabatino Di DiodoroAuthored: Thu Jun 29 12:40:48 2017 +0200 Committer: Marco Di Sabatino Di Diodoro Committed: Thu Jun 29 12:41:50 2017 +0200 -- .../resources/ResourceProvisionPanel.java | 31 1 file changed, 19 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/e19910c2/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel.java index 7bc48d0..28b4605 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel.java @@ -42,6 +42,7 @@ import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPan import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel; import org.apache.syncope.client.console.wizards.AjaxWizard; import org.apache.syncope.client.console.wizards.WizardMgtPanel; +import org.apache.syncope.common.lib.SyncopeClientException; import org.apache.syncope.common.lib.to.MappingItemTO; import org.apache.syncope.common.lib.to.ProvisionTO; import org.apache.syncope.common.lib.to.ResourceTO; @@ -219,20 +220,26 @@ public class ResourceProvisionPanel extends AbstractModalPanel { builder.includes("anyType", "objectClass", "auxClasses"); builder.setReuseItem(false); -builder. -addAction(new ActionLink() { +builder.addAction(new ActionLink() { -private static final long serialVersionUID = -3722207913631435504L; +private static final long serialVersionUID = -3722207913631435504L; -@Override -public void onClick(final AjaxRequestTarget target, final ProvisionTO provisionTO) { -send(ResourceProvisionPanel.this, Broadcast.DEPTH, -new AjaxWizard.NewItemActionEvent<>(provisionTO, 2, target).setResourceModel( -new StringResourceModel("inner.provision.mapping", -ResourceProvisionPanel.this, -Model.of(provisionTO; -} -}, ActionLink.ActionType.MAPPING, StandardEntitlement.RESOURCE_UPDATE). +@Override +public void onClick(final AjaxRequestTarget target, final ProvisionTO provisionTO) { +try { +send(ResourceProvisionPanel.this, Broadcast.DEPTH, +new AjaxWizard.NewItemActionEvent<>(provisionTO, 2, target).setResourceModel( +new StringResourceModel("inner.provision.mapping", +ResourceProvisionPanel.this, +Model.of(provisionTO; +} catch (SyncopeClientException e) { +LOG.error("While contacting resource", e); +SyncopeConsoleSession.get().error( +StringUtils.isBlank(e.getMessage()) ? e.getClass().getName() : e.getMessage()); +((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target); +} +} +}, ActionLink.ActionType.MAPPING, StandardEntitlement.RESOURCE_UPDATE). addAction(new ActionLink() { private static final long serialVersionUID = -7780999687733432439L;
syncope git commit: [SYNCOPE-1095] Provide preview for json and xml binary field
Repository: syncope Updated Branches: refs/heads/master 5b2ce7178 -> e3ca38556 [SYNCOPE-1095] Provide preview for json and xml binary field Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/e3ca3855 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/e3ca3855 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/e3ca3855 Branch: refs/heads/master Commit: e3ca385566df403111f518779c9f1137ca0a7c01 Parents: 5b2ce71 Author: Marco Di Sabatino Di DiodoroAuthored: Thu May 25 12:46:21 2017 +0200 Committer: Marco Di Sabatino Di Diodoro Committed: Thu May 25 12:47:22 2017 +0200 -- .../markup/html/form/preview/BinaryTextPreviewer.java| 11 +++ .../markup/html/form/preview/BinaryTextPreviewer.html| 5 ++--- 2 files changed, 9 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/e3ca3855/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.java index ebde17c..33558d1 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.java @@ -37,6 +37,8 @@ public class BinaryTextPreviewer extends AbstractBinaryPreviewer { private static final long serialVersionUID = 3808379310090668773L; +private String jsonEditorInfoId; + public BinaryTextPreviewer(final String id, final String mimeType) { super(id, mimeType); } @@ -51,7 +53,8 @@ public class BinaryTextPreviewer extends AbstractBinaryPreviewer { InputStream stream = new ByteArrayInputStream(uploadedBytes); TextArea jsonEditor = new TextArea<>("jsonEditorInfo", new Model<>(IOUtils.toString(stream))); - jsonEditor.setMarkupId("jsonEditorInfo").setOutputMarkupPlaceholderTag(true); +jsonEditor.setOutputMarkupPlaceholderTag(true); +jsonEditorInfoId = jsonEditor.getMarkupId(); fragment.add(jsonEditor); } catch (IOException e) { LOG.error("Error evaluating text file", e); @@ -81,13 +84,13 @@ public class BinaryTextPreviewer extends AbstractBinaryPreviewer { } response.render(OnLoadHeaderItem.forScript( -"var editor = CodeMirror.fromTextArea(document.getElementById('jsonEditorInfo'), {" +"var editor = CodeMirror.fromTextArea(document.getElementById('" + jsonEditorInfoId + "'), {" + " readOnly: true, " + " lineNumbers: true, " -+ " lineWrapping: true, " ++ " lineWrapping: false, " + options + " autoRefresh: true" + "});" -+ "editor.setSize('100%', 100)")); ++ "editor.setSize('500', 100)")); } } http://git-wip-us.apache.org/repos/asf/syncope/blob/e3ca3855/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.html -- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.html index 63e71c7..aa730cf 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.html +++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.html @@ -33,7 +33,6 @@ under the License. font-family: Verdana,Tahoma,sans-serif; font-size: 100%; border: 1px solid #BB; -padding: 1%; } @@ -42,8 +41,8 @@ under the License. - - + +
[1/2] syncope git commit: [SYNCOPE-1095] Provide preview for json and xml binary field
Repository: syncope Updated Branches: refs/heads/2_0_X 7c5daa5f2 -> a7bf2af6d [SYNCOPE-1095] Provide preview for json and xml binary field Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/98a3f3bb Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/98a3f3bb Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/98a3f3bb Branch: refs/heads/2_0_X Commit: 98a3f3bb28249a588d1fd51856e5b9aba3777f15 Parents: 7c5daa5 Author: Marco Di Sabatino Di DiodoroAuthored: Wed May 24 15:16:59 2017 +0200 Committer: Marco Di Sabatino Di Diodoro Committed: Thu May 25 12:42:35 2017 +0200 -- .../wicket/markup/html/form/preview/BinaryTextPreviewer.java | 2 -- 1 file changed, 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/98a3f3bb/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.java index c3685d1..ebde17c 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.java @@ -18,8 +18,6 @@ */ package org.apache.syncope.client.console.wicket.markup.html.form.preview; -import static org.apache.syncope.client.console.wicket.markup.html.form.preview.AbstractBinaryPreviewer.LOG; - import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream;
[2/2] syncope git commit: [SYNCOPE-1095] Provide preview for json and xml binary field
[SYNCOPE-1095] Provide preview for json and xml binary field Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/a7bf2af6 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/a7bf2af6 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/a7bf2af6 Branch: refs/heads/2_0_X Commit: a7bf2af6df8308830ee1c3a2aa513bbb1cb0f095 Parents: 98a3f3b Author: Marco Di Sabatino Di DiodoroAuthored: Thu May 25 12:46:21 2017 +0200 Committer: Marco Di Sabatino Di Diodoro Committed: Thu May 25 12:46:21 2017 +0200 -- .../markup/html/form/preview/BinaryTextPreviewer.java| 11 +++ .../markup/html/form/preview/BinaryTextPreviewer.html| 5 ++--- 2 files changed, 9 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/a7bf2af6/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.java index ebde17c..33558d1 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.java @@ -37,6 +37,8 @@ public class BinaryTextPreviewer extends AbstractBinaryPreviewer { private static final long serialVersionUID = 3808379310090668773L; +private String jsonEditorInfoId; + public BinaryTextPreviewer(final String id, final String mimeType) { super(id, mimeType); } @@ -51,7 +53,8 @@ public class BinaryTextPreviewer extends AbstractBinaryPreviewer { InputStream stream = new ByteArrayInputStream(uploadedBytes); TextArea jsonEditor = new TextArea<>("jsonEditorInfo", new Model<>(IOUtils.toString(stream))); - jsonEditor.setMarkupId("jsonEditorInfo").setOutputMarkupPlaceholderTag(true); +jsonEditor.setOutputMarkupPlaceholderTag(true); +jsonEditorInfoId = jsonEditor.getMarkupId(); fragment.add(jsonEditor); } catch (IOException e) { LOG.error("Error evaluating text file", e); @@ -81,13 +84,13 @@ public class BinaryTextPreviewer extends AbstractBinaryPreviewer { } response.render(OnLoadHeaderItem.forScript( -"var editor = CodeMirror.fromTextArea(document.getElementById('jsonEditorInfo'), {" +"var editor = CodeMirror.fromTextArea(document.getElementById('" + jsonEditorInfoId + "'), {" + " readOnly: true, " + " lineNumbers: true, " -+ " lineWrapping: true, " ++ " lineWrapping: false, " + options + " autoRefresh: true" + "});" -+ "editor.setSize('100%', 100)")); ++ "editor.setSize('500', 100)")); } } http://git-wip-us.apache.org/repos/asf/syncope/blob/a7bf2af6/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.html -- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.html index 63e71c7..aa730cf 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.html +++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.html @@ -33,7 +33,6 @@ under the License. font-family: Verdana,Tahoma,sans-serif; font-size: 100%; border: 1px solid #BB; -padding: 1%; } @@ -42,8 +41,8 @@ under the License. - - + +
syncope git commit: [SYNCOPE-1095] Provide preview for json and xml binary field
Repository: syncope Updated Branches: refs/heads/master 87ac9bccb -> 736598fe5 [SYNCOPE-1095] Provide preview for json and xml binary field Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/736598fe Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/736598fe Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/736598fe Branch: refs/heads/master Commit: 736598fe5d61500c7098579515dc934e4766761f Parents: 87ac9bc Author: Marco Di Sabatino Di DiodoroAuthored: Wed May 24 15:11:36 2017 +0200 Committer: Marco Di Sabatino Di Diodoro Committed: Wed May 24 15:13:00 2017 +0200 -- .../markup/html/form/BinaryFieldPanel.java | 8 +- .../html/form/preview/BinaryTextPreviewer.java | 95 .../html/form/preview/BinaryTextPreviewer.html | 52 +++ 3 files changed, 151 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/736598fe/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.java index cc34be5..c5504f5 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.java @@ -61,6 +61,8 @@ import org.apache.wicket.util.lang.Bytes; public class BinaryFieldPanel extends FieldPanel { private static final long serialVersionUID = 6264462604183088931L; + +private static final PreviewUtils PREVIEW_UTILS = PreviewUtils.getInstance(); private final String mimeType; @@ -74,15 +76,13 @@ public class BinaryFieldPanel extends FieldPanel { private final BootstrapFileInputField fileUpload; -private final transient PreviewUtils previewUtils = PreviewUtils.getInstance(); - private final AbstractBinaryPreviewer previewer; public BinaryFieldPanel(final String id, final String name, final IModel model, final String mimeType) { super(id, name, model); this.mimeType = mimeType; -previewer = previewUtils.getPreviewer(mimeType); +previewer = PREVIEW_UTILS.getPreviewer(mimeType); uploadForm = new StatelessForm<>("uploadForm"); uploadForm.setMultiPart(true); @@ -227,7 +227,7 @@ public class BinaryFieldPanel extends FieldPanel { if (StringUtils.isNotBlank(model.getObject())) { final Component panelPreview; if (previewer == null) { -panelPreview = previewUtils.getDefaultPreviewer(mimeType); +panelPreview = PREVIEW_UTILS.getDefaultPreviewer(mimeType); } else { panelPreview = previewer.preview(model.getObject()); } http://git-wip-us.apache.org/repos/asf/syncope/blob/736598fe/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.java new file mode 100644 index 000..c3685d1 --- /dev/null +++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.java @@ -0,0 +1,95 @@ +/* + * 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.wicket.markup.html.form.preview; + +import static
syncope git commit: [SYNCOPE-1095] Provide preview for json and xml binary field
Repository: syncope Updated Branches: refs/heads/2_0_X 8d6dc235c -> 632c5c606 [SYNCOPE-1095] Provide preview for json and xml binary field Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/632c5c60 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/632c5c60 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/632c5c60 Branch: refs/heads/2_0_X Commit: 632c5c60652dd954ee3beb7d3e64b4f8f53d05e2 Parents: 8d6dc23 Author: Marco Di Sabatino Di DiodoroAuthored: Wed May 24 15:11:36 2017 +0200 Committer: Marco Di Sabatino Di Diodoro Committed: Wed May 24 15:11:36 2017 +0200 -- .../markup/html/form/BinaryFieldPanel.java | 8 +- .../html/form/preview/BinaryTextPreviewer.java | 95 .../html/form/preview/BinaryTextPreviewer.html | 52 +++ 3 files changed, 151 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/632c5c60/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.java index cc34be5..c5504f5 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/BinaryFieldPanel.java @@ -61,6 +61,8 @@ import org.apache.wicket.util.lang.Bytes; public class BinaryFieldPanel extends FieldPanel { private static final long serialVersionUID = 6264462604183088931L; + +private static final PreviewUtils PREVIEW_UTILS = PreviewUtils.getInstance(); private final String mimeType; @@ -74,15 +76,13 @@ public class BinaryFieldPanel extends FieldPanel { private final BootstrapFileInputField fileUpload; -private final transient PreviewUtils previewUtils = PreviewUtils.getInstance(); - private final AbstractBinaryPreviewer previewer; public BinaryFieldPanel(final String id, final String name, final IModel model, final String mimeType) { super(id, name, model); this.mimeType = mimeType; -previewer = previewUtils.getPreviewer(mimeType); +previewer = PREVIEW_UTILS.getPreviewer(mimeType); uploadForm = new StatelessForm<>("uploadForm"); uploadForm.setMultiPart(true); @@ -227,7 +227,7 @@ public class BinaryFieldPanel extends FieldPanel { if (StringUtils.isNotBlank(model.getObject())) { final Component panelPreview; if (previewer == null) { -panelPreview = previewUtils.getDefaultPreviewer(mimeType); +panelPreview = PREVIEW_UTILS.getDefaultPreviewer(mimeType); } else { panelPreview = previewer.preview(model.getObject()); } http://git-wip-us.apache.org/repos/asf/syncope/blob/632c5c60/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.java new file mode 100644 index 000..c3685d1 --- /dev/null +++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/preview/BinaryTextPreviewer.java @@ -0,0 +1,95 @@ +/* + * 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.wicket.markup.html.form.preview; + +import static
syncope git commit: [SYNCOPE-1083] Normalizing ConnInstance location
Repository: syncope Updated Branches: refs/heads/2_0_X aa93a35f7 -> eda4574ec [SYNCOPE-1083] Normalizing ConnInstance location Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/eda4574e Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/eda4574e Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/eda4574e Branch: refs/heads/2_0_X Commit: eda4574ec956d8498dfe96100907e4fb91ff1875 Parents: aa93a35 Author: Marco Di Sabatino Di DiodoroAuthored: Wed May 17 13:19:54 2017 +0200 Committer: Marco Di Sabatino Di Diodoro Committed: Wed May 17 13:19:54 2017 +0200 -- .../core/provisioning/api/ConnIdBundleManager.java| 3 ++- .../core/provisioning/java/ConnIdBundleManagerImpl.java | 5 +++-- .../core/provisioning/java/ConnectorFacadeProxy.java | 2 +- .../java/data/ConnInstanceDataBinderImpl.java | 10 +++--- 4 files changed, 13 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/eda4574e/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ConnIdBundleManager.java -- diff --git a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ConnIdBundleManager.java b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ConnIdBundleManager.java index 242202f..1913e68 100644 --- a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ConnIdBundleManager.java +++ b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ConnIdBundleManager.java @@ -21,6 +21,7 @@ package org.apache.syncope.core.provisioning.api; import java.net.URI; import java.util.List; import java.util.Map; +import org.apache.commons.lang3.tuple.Pair; import org.apache.syncope.core.persistence.api.entity.ConnInstance; import org.identityconnectors.framework.api.ConfigurationProperties; import org.identityconnectors.framework.api.ConnectorInfo; @@ -35,7 +36,7 @@ public interface ConnIdBundleManager { Map getConnManagers(); -ConnectorInfo getConnectorInfo(ConnInstance connInstance); +Pair getConnectorInfo(ConnInstance connInstance); Map getConnInfoManagers(); http://git-wip-us.apache.org/repos/asf/syncope/blob/eda4574e/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ConnIdBundleManagerImpl.java -- diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ConnIdBundleManagerImpl.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ConnIdBundleManagerImpl.java index 7e103bb..69e1049 100644 --- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ConnIdBundleManagerImpl.java +++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ConnIdBundleManagerImpl.java @@ -32,6 +32,7 @@ import java.util.Map; import javax.net.ssl.TrustManager; import javax.net.ssl.X509TrustManager; import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.tuple.Pair; import org.apache.syncope.core.persistence.api.dao.NotFoundException; import org.apache.syncope.core.persistence.api.entity.ConnInstance; import org.apache.syncope.core.provisioning.api.ConnIdBundleManager; @@ -224,7 +225,7 @@ public class ConnIdBundleManagerImpl implements ConnIdBundleManager { } @Override -public ConnectorInfo getConnectorInfo(final ConnInstance connInstance) { +public Pair getConnectorInfo(final ConnInstance connInstance) { // check ConnIdLocation URI uriLocation = null; try { @@ -252,7 +253,7 @@ public class ConnIdBundleManagerImpl implements ConnIdBundleManager { throw new NotFoundException("ConnectorInfo for location " + connInstance.getLocation() + " and key " + key); } -return info; +return Pair.of(uriLocation, info); } @Override http://git-wip-us.apache.org/repos/asf/syncope/blob/eda4574e/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ConnectorFacadeProxy.java -- diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ConnectorFacadeProxy.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ConnectorFacadeProxy.java index a62444e..a8024f2 100644 ---
syncope git commit: [SYNCOPE-1083] Normalizing ConnInstance location
Repository: syncope Updated Branches: refs/heads/master 74bf00b47 -> cbd108309 [SYNCOPE-1083] Normalizing ConnInstance location Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/cbd10830 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/cbd10830 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/cbd10830 Branch: refs/heads/master Commit: cbd10830915ce423dfce7ce4b555d01f00e51300 Parents: 74bf00b Author: Marco Di Sabatino Di DiodoroAuthored: Wed May 17 13:19:54 2017 +0200 Committer: Marco Di Sabatino Di Diodoro Committed: Wed May 17 13:22:01 2017 +0200 -- .../core/provisioning/api/ConnIdBundleManager.java| 3 ++- .../core/provisioning/java/ConnIdBundleManagerImpl.java | 5 +++-- .../core/provisioning/java/ConnectorFacadeProxy.java | 2 +- .../java/data/ConnInstanceDataBinderImpl.java | 10 +++--- 4 files changed, 13 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/cbd10830/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ConnIdBundleManager.java -- diff --git a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ConnIdBundleManager.java b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ConnIdBundleManager.java index 242202f..1913e68 100644 --- a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ConnIdBundleManager.java +++ b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ConnIdBundleManager.java @@ -21,6 +21,7 @@ package org.apache.syncope.core.provisioning.api; import java.net.URI; import java.util.List; import java.util.Map; +import org.apache.commons.lang3.tuple.Pair; import org.apache.syncope.core.persistence.api.entity.ConnInstance; import org.identityconnectors.framework.api.ConfigurationProperties; import org.identityconnectors.framework.api.ConnectorInfo; @@ -35,7 +36,7 @@ public interface ConnIdBundleManager { Map getConnManagers(); -ConnectorInfo getConnectorInfo(ConnInstance connInstance); +Pair getConnectorInfo(ConnInstance connInstance); Map getConnInfoManagers(); http://git-wip-us.apache.org/repos/asf/syncope/blob/cbd10830/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ConnIdBundleManagerImpl.java -- diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ConnIdBundleManagerImpl.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ConnIdBundleManagerImpl.java index 7e103bb..69e1049 100644 --- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ConnIdBundleManagerImpl.java +++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ConnIdBundleManagerImpl.java @@ -32,6 +32,7 @@ import java.util.Map; import javax.net.ssl.TrustManager; import javax.net.ssl.X509TrustManager; import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.tuple.Pair; import org.apache.syncope.core.persistence.api.dao.NotFoundException; import org.apache.syncope.core.persistence.api.entity.ConnInstance; import org.apache.syncope.core.provisioning.api.ConnIdBundleManager; @@ -224,7 +225,7 @@ public class ConnIdBundleManagerImpl implements ConnIdBundleManager { } @Override -public ConnectorInfo getConnectorInfo(final ConnInstance connInstance) { +public Pair getConnectorInfo(final ConnInstance connInstance) { // check ConnIdLocation URI uriLocation = null; try { @@ -252,7 +253,7 @@ public class ConnIdBundleManagerImpl implements ConnIdBundleManager { throw new NotFoundException("ConnectorInfo for location " + connInstance.getLocation() + " and key " + key); } -return info; +return Pair.of(uriLocation, info); } @Override http://git-wip-us.apache.org/repos/asf/syncope/blob/cbd10830/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ConnectorFacadeProxy.java -- diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ConnectorFacadeProxy.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/ConnectorFacadeProxy.java index a62444e..a8024f2 100644 ---
syncope git commit: [SYNCOPE-1083] Normalizing ConnInstance location
Repository: syncope Updated Branches: refs/heads/1_2_X 8d309e2a6 -> fdff25174 [SYNCOPE-1083] Normalizing ConnInstance location Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/fdff2517 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/fdff2517 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/fdff2517 Branch: refs/heads/1_2_X Commit: fdff25174e76ee52f7e22d41ab33c1a41f7e2bd0 Parents: 8d309e2 Author: Marco Di Sabatino Di DiodoroAuthored: Wed May 17 12:00:57 2017 +0200 Committer: Marco Di Sabatino Di Diodoro Committed: Wed May 17 12:06:58 2017 +0200 -- .../propagation/impl/ConnectorFacadeProxy.java | 2 +- .../core/rest/data/ConnInstanceDataBinder.java | 19 +-- .../syncope/core/util/ConnIdBundleManager.java | 5 +++-- 3 files changed, 17 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/fdff2517/core/src/main/java/org/apache/syncope/core/propagation/impl/ConnectorFacadeProxy.java -- diff --git a/core/src/main/java/org/apache/syncope/core/propagation/impl/ConnectorFacadeProxy.java b/core/src/main/java/org/apache/syncope/core/propagation/impl/ConnectorFacadeProxy.java index fb3c872..6cf63d0 100644 --- a/core/src/main/java/org/apache/syncope/core/propagation/impl/ConnectorFacadeProxy.java +++ b/core/src/main/java/org/apache/syncope/core/propagation/impl/ConnectorFacadeProxy.java @@ -99,7 +99,7 @@ public class ConnectorFacadeProxy implements Connector { ConnIdBundleManager connIdBundleManager = ApplicationContextProvider.getApplicationContext().getBean(ConnIdBundleManager.class); ConnectorInfo info = connIdBundleManager.getConnectorInfo(connInstance.getLocation(), -connInstance.getBundleName(), connInstance.getVersion(), connInstance.getConnectorName()); +connInstance.getBundleName(), connInstance.getVersion(), connInstance.getConnectorName()).getRight(); // create default configuration APIConfiguration apiConfig = info.createDefaultAPIConfiguration(); http://git-wip-us.apache.org/repos/asf/syncope/blob/fdff2517/core/src/main/java/org/apache/syncope/core/rest/data/ConnInstanceDataBinder.java -- diff --git a/core/src/main/java/org/apache/syncope/core/rest/data/ConnInstanceDataBinder.java b/core/src/main/java/org/apache/syncope/core/rest/data/ConnInstanceDataBinder.java index 50bcf03..c91d197 100644 --- a/core/src/main/java/org/apache/syncope/core/rest/data/ConnInstanceDataBinder.java +++ b/core/src/main/java/org/apache/syncope/core/rest/data/ConnInstanceDataBinder.java @@ -18,11 +18,13 @@ */ package org.apache.syncope.core.rest.data; +import java.net.URI; import java.util.Arrays; import java.util.Collection; import java.util.HashSet; import java.util.Map; import java.util.Set; +import org.apache.commons.lang3.tuple.Pair; import org.apache.syncope.common.to.ConnInstanceTO; import org.apache.syncope.common.to.ConnPoolConfTO; import org.apache.syncope.common.types.ConnConfPropSchema; @@ -34,8 +36,10 @@ import org.apache.syncope.core.connid.ConnPoolConfUtil; import org.apache.syncope.core.persistence.beans.ConnInstance; import org.apache.syncope.core.persistence.dao.ConnInstanceDAO; import org.apache.syncope.core.util.ConnIdBundleManager; +import org.apache.syncope.core.util.URIUtil; import org.identityconnectors.framework.api.ConfigurationProperties; import org.identityconnectors.framework.api.ConfigurationProperty; +import org.identityconnectors.framework.api.ConnectorInfo; import org.identityconnectors.framework.impl.api.ConfigurationPropertyImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -43,7 +47,7 @@ import org.springframework.stereotype.Component; @Component public class ConnInstanceDataBinder { -private static final String[] IGNORE_PROPERTIES = { "id", "poolConf" }; +private static final String[] IGNORE_PROPERTIES = { "id", "poolConf", "location" }; @Autowired private ConnIdBundleManager connIdBundleManager; @@ -203,15 +207,18 @@ public class ConnInstanceDataBinder { public ConnInstanceTO getConnInstanceTO(final ConnInstance connInstance) { ConnInstanceTO connInstanceTO = new ConnInstanceTO(); -connInstanceTO.setId(connInstance.getId() == null ? 0L : connInstance.getId().longValue()); +connInstanceTO.setId(connInstance.getId() == null ? 0L : connInstance.getId()); -// retrieve the ConfigurationProperties -ConfigurationProperties properties =