jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1466972 - /jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/ShadowInvisibleContentTest.java
Date Thu, 11 Apr 2013 17:04:22 GMT
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());
+        }
+    }
+
 }



Mime
View raw message