jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1466618 - in /jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization: ObservationTest.java PrivilegeManagementTest.java
Date Wed, 10 Apr 2013 18:53:43 GMT
Author: angela
Date: Wed Apr 10 18:53:42 2013
New Revision: 1466618

URL: http://svn.apache.org/r1466618
Log:
OAK-527: permissions (WIP: include permission related tests)

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

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/ObservationTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/ObservationTest.java?rev=1466618&r1=1466617&r2=1466618&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/ObservationTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/ObservationTest.java
Wed Apr 10 18:53:42 2013
@@ -20,13 +20,11 @@ import javax.jcr.observation.Event;
 import javax.jcr.observation.ObservationManager;
 
 import org.apache.jackrabbit.test.api.observation.EventResult;
-import org.junit.Ignore;
 import org.junit.Test;
 
 /**
  * ObservationTest... TODO
  */
-@Ignore("OAK-51")
 public class ObservationTest extends AbstractEvaluationTest {
 
     private static final long DEFAULT_WAIT_TIMEOUT = 5000;

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/PrivilegeManagementTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/PrivilegeManagementTest.java?rev=1466618&r1=1466617&r2=1466618&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/PrivilegeManagementTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/PrivilegeManagementTest.java
Wed Apr 10 18:53:42 2013
@@ -25,13 +25,11 @@ import javax.jcr.security.Privilege;
 
 import org.apache.jackrabbit.api.JackrabbitWorkspace;
 import org.apache.jackrabbit.test.NotExecutableException;
-import org.junit.Ignore;
 import org.junit.Test;
 
 /**
  * PrivilegeManagementTest... TODO
  */
-@Ignore("OAK-51")
 public class PrivilegeManagementTest extends AbstractEvaluationTest {
 
     private static final String REP_PRIVILEGE_MANAGEMENT = "rep:privilegeManagement";
@@ -86,16 +84,22 @@ public class PrivilegeManagementTest ext
     }
 
     @Test
-    public void testRegisterPrivilegeWithPrivilege() throws Exception {
+    public void testModifyPrivilegeMgtPrivilege() throws Exception {
         modify(null, REP_PRIVILEGE_MANAGEMENT, true);
         assertHasPrivilege(null, REP_PRIVILEGE_MANAGEMENT, true);
 
+        modify(null, REP_PRIVILEGE_MANAGEMENT, false);
+        assertHasPrivilege(null, REP_PRIVILEGE_MANAGEMENT, false);
+    }
+
+    @Test
+    public void testRegisterPrivilegeWithPrivilege() throws Exception {
+        modify(null, REP_PRIVILEGE_MANAGEMENT, true);
         try {
             Workspace testWsp = testSession.getWorkspace();
-            ((JackrabbitWorkspace) testWsp).getPrivilegeManager().registerPrivilege(getNewPrivilegeName(testWsp),
false, new String[0]);        } finally {
+            ((JackrabbitWorkspace) testWsp).getPrivilegeManager().registerPrivilege(getNewPrivilegeName(testWsp),
false, new String[0]);
+        } finally {
             modify(null, REP_PRIVILEGE_MANAGEMENT, false);
         }
-
-        assertHasPrivilege(null, REP_PRIVILEGE_MANAGEMENT, false);
     }
 }
\ No newline at end of file



Mime
View raw message