jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1390385 - in /jackrabbit/oak/trunk/oak-core/src: main/java/org/apache/jackrabbit/oak/spi/security/user/UserProvider.java test/java/org/apache/jackrabbit/oak/security/user/UserProviderImplTest.java
Date Wed, 26 Sep 2012 10:32:07 GMT
Author: angela
Date: Wed Sep 26 10:32:06 2012
New Revision: 1390385

URL: http://svn.apache.org/viewvc?rev=1390385&view=rev
Log:
OAK-50 : Implement User Management (WIP)

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/user/UserProvider.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/UserProviderImplTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/user/UserProvider.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/user/UserProvider.java?rev=1390385&r1=1390384&r2=1390385&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/user/UserProvider.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/user/UserProvider.java
Wed Sep 26 10:32:06 2012
@@ -49,7 +49,7 @@ public interface UserProvider {
     Tree getAuthorizableByPrincipal(Principal principal);
 
     @CheckForNull
-    String getAuthorizableId(Tree authorizableTree, Type authorizableType);
+    String getAuthorizableId(Tree authorizableTree);
 
     /**
      * Find the authorizable trees matching the following search parameters within

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/UserProviderImplTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/UserProviderImplTest.java?rev=1390385&r1=1390384&r2=1390385&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/UserProviderImplTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/UserProviderImplTest.java
Wed Sep 26 10:32:06 2012
@@ -256,7 +256,7 @@ public class UserProviderImplTest extend
             root.commit(DefaultConflictHandler.OURS);
 
             assertEquals(defaultUserPath + m.get(uid), user.getPath());
-            assertEquals(uid, userProvider.getAuthorizableId(user, Type.USER));
+            assertEquals(uid, userProvider.getAuthorizableId(user));
 
             Tree ath = userProvider.getAuthorizable(uid);
             assertNotNull("Tree with id " + uid + " must exist.", ath);
@@ -347,15 +347,11 @@ public class UserProviderImplTest extend
 
         String userID = "Amanda";
         Tree user = up.createUser(userID, null);
-        assertEquals(userID, up.getAuthorizableId(user, Type.USER));
-        assertEquals(userID, up.getAuthorizableId(user, Type.AUTHORIZABLE));
-        assertNull(up.getAuthorizableId(user, Type.GROUP));
+        assertEquals(userID, up.getAuthorizableId(user));
 
         String groupID = "visitors";
         Tree group = up.createGroup(groupID, null);
-        assertEquals(groupID, up.getAuthorizableId(group, Type.GROUP));
-        assertEquals(groupID, up.getAuthorizableId(group, Type.AUTHORIZABLE));
-        assertNull(up.getAuthorizableId(group, Type.USER));
+        assertEquals(groupID, up.getAuthorizableId(group));
     }
 
     @Test



Mime
View raw message