usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mru...@apache.org
Subject usergrid git commit: Make application users service use same logic for get by name.
Date Tue, 23 Aug 2016 22:32:25 GMT
Repository: usergrid
Updated Branches:
  refs/heads/hotfix-20160819 d2cdcd3f8 -> a9c7190a4


Make application users service use same logic for get by name.


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

Branch: refs/heads/hotfix-20160819
Commit: a9c7190a4b853a564c02f07ba285678b88a24df2
Parents: d2cdcd3
Author: Michael Russo <mrusso@apigee.com>
Authored: Tue Aug 23 15:32:06 2016 -0700
Committer: Michael Russo <mrusso@apigee.com>
Committed: Tue Aug 23 15:32:06 2016 -0700

----------------------------------------------------------------------
 .../usergrid/services/users/UsersService.java   | 29 +-------------------
 1 file changed, 1 insertion(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/a9c7190a/stack/services/src/main/java/org/apache/usergrid/services/users/UsersService.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/services/users/UsersService.java
b/stack/services/src/main/java/org/apache/usergrid/services/users/UsersService.java
index 0539695..90d4fff 100644
--- a/stack/services/src/main/java/org/apache/usergrid/services/users/UsersService.java
+++ b/stack/services/src/main/java/org/apache/usergrid/services/users/UsersService.java
@@ -79,34 +79,7 @@ public class UsersService extends AbstractCollectionService {
 
     @Override
     public ServiceResults getItemByName( ServiceContext context, String name ) throws Exception
{
-        String nameProperty = Schema.getDefaultSchema().aliasProperty( getEntityType() );
-
-        if ( nameProperty == null ) {
-            nameProperty = "name";
-        }
-
-        EntityRef entity = null;
-        Identifier id = Identifier.from( name );
-
-        if ( id != null ) {
-            entity = em.getUserByIdentifier( id );
-        }
-
-        if ( entity == null ) {
-            throw new ServiceResourceNotFoundException( context );
-        }
-
-        if ( !context.moreParameters() ) {
-            entity = em.get( entity );
-            entity = importEntity( context, ( Entity ) entity );
-        }
-
-        checkPermissionsForEntity( context, entity );
-
-        List<ServiceRequest> nextRequests = context.getNextServiceRequests( entity
);
-
-        return new ServiceResults( this, context, ServiceResults.Type.COLLECTION, Results.fromRef(
entity ), null,
-                nextRequests );
+        super.getItemByName(context, name);
     }
 
 


Mime
View raw message