jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1538977 - /jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/ReadPropertyTest.java
Date Tue, 05 Nov 2013 12:57:37 GMT
Author: angela
Date: Tue Nov  5 12:57:36 2013
New Revision: 1538977

URL: http://svn.apache.org/r1538977
Log:
OAK-527: test case

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

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/ReadPropertyTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/ReadPropertyTest.java?rev=1538977&r1=1538976&r2=1538977&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/ReadPropertyTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/ReadPropertyTest.java
Tue Nov  5 12:57:36 2013
@@ -53,6 +53,26 @@ public class ReadPropertyTest extends Ab
     }
 
     @Test
+    public void testDenyReadProperty() throws Exception {
+        allow(path, privilegesFromName(PrivilegeConstants.JCR_READ));
+        deny(path, privilegesFromName(PrivilegeConstants.REP_READ_PROPERTIES));
+
+        assertTrue(testSession.nodeExists(path));
+        assertTrue(testSession.itemExists(path));
+        assertTrue(testSession.nodeExists(childNPath));
+
+        List<String> propertyPaths = new ArrayList<String>();
+        propertyPaths.add(childPPath);
+        propertyPaths.add(childchildPPath);
+        propertyPaths.add(path + "/jcr:primaryType");
+
+        for (String pPath : propertyPaths) {
+            assertFalse(testSession.itemExists(pPath));
+            assertFalse(testSession.propertyExists(pPath));
+        }
+    }
+
+    @Test
     public void testReadProperty2() throws Exception {
         deny(path, privilegesFromName(PrivilegeConstants.REP_READ_NODES));
 



Mime
View raw message