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 md...@apache.org on 2013/04/11 19:04:22 UTC
svn commit: r1466972 -
/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/ShadowInvisibleContentTest.java
Author: mduerig
Date: Thu Apr 11 17:04:22 2013
New Revision: 1466972
URL: http://svn.apache.org/r1466972
Log:
OAK-709: Consider moving permission evaluation to the node state level
test: shadow invisible property should result on access violation on commit. Currently ignored. See FIXME
Modified:
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/ShadowInvisibleContentTest.java
Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/ShadowInvisibleContentTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/ShadowInvisibleContentTest.java?rev=1466972&r1=1466971&r2=1466972&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/ShadowInvisibleContentTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/ShadowInvisibleContentTest.java Thu Apr 11 17:04:22 2013
@@ -129,4 +129,27 @@ public class ShadowInvisibleContentTest
}
}
+ @Test
+ @Ignore // FIXME how do we handle the case where the shadowing item is the same as the shadowing item?
+ public void testShadowInvisibleProperty2() throws CommitFailedException, RepositoryException, LoginException {
+ setupPermission(userPrincipal, "/a", true, PrivilegeConstants.JCR_ALL);
+ setupPermission(userPrincipal, "/a", false, PrivilegeConstants.REP_READ_PROPERTIES);
+
+ Root root = getLatestRoot();
+ Tree a = root.getTree("/a");
+
+ // /a/x not visible to this session
+ assertNull(a.getProperty("x"));
+
+ // shadow /a/x with transient property of the same name
+ a.setProperty("x", "xValue");
+ assertNotNull(a.getProperty("x"));
+
+ try {
+ root.commit();
+ } catch (CommitFailedException e) {
+ assertTrue(e.isAccessViolation());
+ }
+ }
+
}