You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by an...@apache.org on 2013/07/25 18:49:10 UTC
svn commit: r1507061 -
/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/ReadPropertyTest.java
Author: angela
Date: Thu Jul 25 16:49:10 2013
New Revision: 1507061
URL: http://svn.apache.org/r1507061
Log:
OAK-226: adding 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=1507061&r1=1507060&r2=1507061&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 Thu Jul 25 16:49:10 2013
@@ -69,12 +69,11 @@ public class ReadPropertyTest extends Ab
assertTrue(testSession.itemExists(pPath));
assertTrue(testSession.propertyExists(pPath));
Property p = testSession.getProperty(pPath);
- assertEquals(pPath, p.getPath());
}
}
@Test
- public void testReadPropertyParent() throws Exception {
+ public void testGetParent() throws Exception {
deny(path, privilegesFromName(PrivilegeConstants.REP_READ_NODES));
List<String> propertyPaths = new ArrayList<String>();
@@ -92,4 +91,20 @@ public class ReadPropertyTest extends Ab
}
}
}
+
+ @Test
+ public void testGetPath() throws Exception {
+ deny(path, privilegesFromName(PrivilegeConstants.JCR_READ));
+ allow(path, privilegesFromName(PrivilegeConstants.REP_READ_PROPERTIES));
+
+ List<String> propertyPaths = new ArrayList<String>();
+ propertyPaths.add(childPPath);
+ propertyPaths.add(childchildPPath);
+ propertyPaths.add(path + "/jcr:primaryType");
+
+ for (String pPath : propertyPaths) {
+ Property p = testSession.getProperty(pPath);
+ assertEquals(pPath, p.getPath());
+ }
+ }
}
\ No newline at end of file