You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2020/04/23 07:33:43 UTC
[syncope] 02/02: No need to check admin rights on Resource when
only listing connector objects
This is an automated email from the ASF dual-hosted git repository.
ilgrosso pushed a commit to branch 2_1_X
in repository https://gitbox.apache.org/repos/asf/syncope.git
commit 8a5323d79c56ec2844d662fe96a5d64bc1f234ee
Author: Francesco Chicchiriccò <il...@apache.org>
AuthorDate: Thu Apr 23 09:28:41 2020 +0200
No need to check admin rights on Resource when only listing connector objects
---
.../src/main/java/org/apache/syncope/core/logic/ResourceLogic.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/ResourceLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/ResourceLogic.java
index 7fc2f08..d059ede 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/ResourceLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/ResourceLogic.java
@@ -34,7 +34,6 @@ import org.apache.syncope.common.lib.to.ConnObjectTO;
import org.apache.syncope.common.lib.to.ResourceTO;
import org.apache.syncope.common.lib.types.ClientExceptionType;
import org.apache.syncope.common.lib.types.StandardEntitlement;
-import org.apache.syncope.core.persistence.api.dao.DuplicateException;
import org.apache.syncope.core.persistence.api.dao.ExternalResourceDAO;
import org.apache.syncope.core.persistence.api.dao.NotFoundException;
import org.apache.syncope.core.persistence.api.entity.resource.ExternalResource;
@@ -45,6 +44,7 @@ import org.apache.syncope.core.provisioning.api.data.ResourceDataBinder;
import org.apache.syncope.core.provisioning.java.utils.ConnObjectUtils;
import org.apache.syncope.core.persistence.api.dao.AnyTypeDAO;
import org.apache.syncope.core.persistence.api.dao.ConnInstanceDAO;
+import org.apache.syncope.core.persistence.api.dao.DuplicateException;
import org.apache.syncope.core.persistence.api.dao.VirSchemaDAO;
import org.apache.syncope.core.persistence.api.dao.search.OrderByClause;
import org.apache.syncope.core.persistence.api.entity.Any;
@@ -270,7 +270,7 @@ public class ResourceLogic extends AbstractTransactionalLogic<ResourceTO> {
}
private Provision getProvision(final String resourceKey, final String anyTypeKey) {
- ExternalResource resource = resourceDAO.authFind(resourceKey);
+ ExternalResource resource = resourceDAO.find(resourceKey);
if (resource == null) {
throw new NotFoundException("Resource '" + resourceKey + "'");
}
@@ -383,7 +383,7 @@ public class ResourceLogic extends AbstractTransactionalLogic<ResourceTO> {
ObjectClass objectClass;
OperationOptions options;
if (SyncopeConstants.REALM_ANYTYPE.equals(anyTypeKey)) {
- resource = resourceDAO.authFind(key);
+ resource = resourceDAO.find(key);
if (resource == null) {
throw new NotFoundException("Resource '" + key + "'");
}