You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by an...@apache.org on 2019/01/25 15:17:54 UTC

[syncope] branch 2_1_X updated: [SYNCOPE-1428] read by key not authenticated now returns 401

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

andreapatricelli 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 cc52bb8  [SYNCOPE-1428] read by key not authenticated now returns 401
cc52bb8 is described below

commit cc52bb8086b534facf74e34f31b02a9fb295de54
Author: Andrea Patricelli <an...@apache.org>
AuthorDate: Fri Jan 25 16:17:19 2019 +0100

    [SYNCOPE-1428] read by key not authenticated now returns 401
---
 .../org/apache/syncope/core/rest/cxf/service/AbstractServiceImpl.java | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractServiceImpl.java
index be1acfe..73eaf5b 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractServiceImpl.java
@@ -44,7 +44,6 @@ import org.apache.syncope.common.rest.api.service.JAXRSService;
 import org.apache.syncope.common.rest.api.Preference;
 import org.apache.syncope.common.rest.api.RESTHeaders;
 import org.apache.syncope.core.persistence.api.dao.AnyDAO;
-import org.apache.syncope.core.persistence.api.dao.NotFoundException;
 import org.apache.syncope.core.persistence.api.search.SearchCondVisitor;
 import org.apache.syncope.core.persistence.api.dao.search.OrderByClause;
 import org.apache.syncope.core.persistence.api.dao.search.SearchCond;
@@ -70,9 +69,6 @@ abstract class AbstractServiceImpl implements JAXRSService {
         String actualKey = pretendingKey;
         if (!SyncopeConstants.UUID_PATTERN.matcher(pretendingKey).matches()) {
             actualKey = dao.findKey(pretendingKey);
-            if (actualKey == null) {
-                throw new NotFoundException("User, Group or Any Object for " + pretendingKey);
-            }
         }
 
         return actualKey;