jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1475692 - /jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/UserManagementTest.java
Date Thu, 25 Apr 2013 10:24:30 GMT
Author: angela
Date: Thu Apr 25 10:24:30 2013
New Revision: 1475692

URL: http://svn.apache.org/r1475692
Log:
OAK-796: adjust tests

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/UserManagementTest.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/UserManagementTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/UserManagementTest.java?rev=1475692&r1=1475691&r2=1475692&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/UserManagementTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/UserManagementTest.java
Thu Apr 25 10:24:30 2013
@@ -115,6 +115,16 @@ public class UserManagementTest extends 
     @Test
     public void testCreateUser() throws Exception {
         UserManager testUserMgr = getUserManager(testSession);
+        modify("/", PrivilegeConstants.REP_USER_MANAGEMENT, true);
+
+        // creating user should succeed
+        testUserMgr.createUser(userId, "pw");
+        testSession.save();
+    }
+
+    @Test
+    public void testCreateUser2() throws Exception {
+        UserManager testUserMgr = getUserManager(testSession);
         Privilege[] privs = privilegesFromNames(new String[] {PrivilegeConstants.REP_USER_MANAGEMENT,
PrivilegeConstants.REP_WRITE});
         allow("/", privs);
 
@@ -126,6 +136,16 @@ public class UserManagementTest extends 
     @Test
     public void testCreateGroup() throws Exception {
         UserManager testUserMgr = getUserManager(testSession);
+        modify("/", PrivilegeConstants.REP_USER_MANAGEMENT, true);
+
+        // creating group should succeed
+        Group gr = testUserMgr.createGroup(groupId);
+        testSession.save();
+    }
+
+    @Test
+    public void testCreateGroup2() throws Exception {
+        UserManager testUserMgr = getUserManager(testSession);
         Privilege[] privs = privilegesFromNames(new String[] {PrivilegeConstants.REP_USER_MANAGEMENT,
PrivilegeConstants.REP_WRITE});
         allow("/", privs);
 



Mime
View raw message