Package org.apache.jackrabbit.oak.spi.security.authorization.permission

Examples of org.apache.jackrabbit.oak.spi.security.authorization.permission.TreePermission


            tree = tree.getParent();
            if (tree.exists()) {
                trees.add(0, tree);
            }
        }
        TreePermission pp = TreePermission.EMPTY;
        for (ImmutableTree tr : trees) {
            pp = new TreePermissionImpl(tr, type, pp);
        }
        return pp;
    }
View Full Code Here


                // FIXME don't rely on toString for session id
                if (provider.includeCommit(contentSession.toString(), info)) {
                    String path = namePathMapper.getOakPath(provider.getPath());
                    ImmutableTree beforeTree = getTree(previousRoot, path);
                    ImmutableTree afterTree = getTree(root, path);
                    TreePermission treePermission = getTreePermission(afterTree);
                    EventIterator<Event> events = new EventIterator<Event>(
                            beforeTree.getNodeState(), afterTree.getNodeState(), path,
                            provider.getFilter(beforeTree, afterTree, treePermission),
                            new JcrListener(beforeTree, afterTree, namePathMapper, info));
                    if (events.hasNext()) {
View Full Code Here

        acl.addEntry(testPrincipal, privilegesFromNames(PrivilegeConstants.JCR_READ), true);
        acl.addEntry(testPrincipal, privilegesFromNames(PrivilegeConstants.REP_READ_PROPERTIES), false);
        acMgr.setPolicy("/test", acl);
        root.commit();

        TreePermission tp = getTreePermission("/test");

        assertFalse(tp.canReadProperties());
        assertTrue(tp.canRead());
        assertFalse(tp.canReadProperties());
    }
View Full Code Here

        NodeUtil ace = new NodeUtil(policyTree).addChild("ace2", NT_REP_DENY_ACE);
        ace.setNames(REP_PRIVILEGES, PrivilegeConstants.REP_READ_PROPERTIES);
        ace.setString(REP_PRINCIPAL_NAME, getTestUser().getPrincipal().getName());
        root.commit();

        TreePermission tp = getTreePermission("/test");

        assertFalse(tp.canReadProperties());
        assertTrue(tp.canRead());
        assertFalse(tp.canReadProperties());
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.spi.security.authorization.permission.TreePermission

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.