Examples of UnmodifiableAccessControlList


Examples of org.apache.jackrabbit.core.security.authorization.UnmodifiableAccessControlList

        // it to the list
        if (isAccessControlled(node)) {
            // build acl for the access controlled node
            NodeImpl aclNode = node.getNode(N_POLICY);
            AccessControlList acl = systemEditor.getACL(aclNode);
            acls.add(new UnmodifiableAccessControlList(acl));
        }
        // then, recursively look for access controlled parents up the hierarchy.
        if (!rootNodeId.equals(node.getId())) {
            NodeImpl parentNode = (NodeImpl) node.getParent();
            collectAcls(parentNode, acls);
View Full Code Here

Examples of org.apache.jackrabbit.core.security.authorization.UnmodifiableAccessControlList

            NodeImpl aclNode = (NodeImpl) it.nextNode().getParent();
            NodeImpl accessControlledNode = (NodeImpl) aclNode.getParent();
           
            if (isAccessControlled(accessControlledNode)) {
                if (permissions.canRead(aclNode.getPrimaryPath(), aclNode.getNodeId())) {
                    acls.add(new UnmodifiableAccessControlList(entryCollector.getEntries(accessControlledNode), accessControlledNode.getPath(), Collections.<String, Integer>emptyMap()));
                } else {
                    throw new AccessDeniedException("Access denied at " + Text.getRelativeParent(aclNode.getPath(), 1));
                }
            }
        }
View Full Code Here

Examples of org.apache.jackrabbit.core.security.authorization.UnmodifiableAccessControlList

        // if the given node is access-controlled, construct a new ACL and add
        // it to the list
        if (isAccessControlled(node)) {
            if (permissions.grants(node.getPrimaryPath(), Permission.READ_AC)) {
                // retrieve the entries for the access controlled node
                acls.add(new UnmodifiableAccessControlList(entryCollector.getEntries(node), node.getPath(), Collections.<String, Integer>emptyMap()));
            } else {
                throw new AccessDeniedException("Access denied at " + node.getPath());
            }
        }
        // then, recursively look for access controlled parents up the hierarchy.
View Full Code Here

Examples of org.apache.jackrabbit.core.security.authorization.UnmodifiableAccessControlList

                ACLTemplate acl = (ACLTemplate) policies[0];
                for (AccessControlEntry ace : acl.getAccessControlEntries()) {
                    ACLTemplate.Entry entry = (ACLTemplate.Entry) ace;
                    if (entry.matches(jcrPath)) {
                        if (permissions.grants(acPath, Permission.READ_AC)) {
                            acls.add(new UnmodifiableAccessControlList(acl));
                            break;
                        } else {
                            throw new AccessDeniedException("Access denied at " + accessControlledNodePath);
                        }
                    }
View Full Code Here

Examples of org.apache.jackrabbit.core.security.authorization.UnmodifiableAccessControlList

        List<AccessControlPolicy> acls = new ArrayList<AccessControlPolicy>(principals.size());
        for (Principal principal : principals) {
            ACLTemplate acl = editor.getACL(principal);
            if (acl != null) {
                if (permissions.grants(session.getQPath(acl.getPath()), Permission.READ_AC)) {
                    acls.add(new UnmodifiableAccessControlList(acl));
                } else {
                    throw new AccessDeniedException("Access denied at " + acl.getPath());
                }
            }
        }
View Full Code Here

Examples of org.apache.jackrabbit.core.security.authorization.UnmodifiableAccessControlList

            targetNode = (NodeImpl) session.getRootNode();
            if (isRepoAccessControlled(targetNode)) {
                if (permissions.grants(targetNode.getPrimaryPath(), Permission.READ_AC)) {
                    // retrieve the entries for the access controlled node
                    List<AccessControlEntry> entries = entryCollector.collectEntries(null, new EntryFilterImpl(null, (NodeId) null, session));
                    acls.add(new UnmodifiableAccessControlList(entries));
                } else {
                    throw new AccessDeniedException("Access denied at " + targetNode.getPath());
                }
            }
        } else {
View Full Code Here

Examples of org.apache.jackrabbit.core.security.authorization.UnmodifiableAccessControlList

            NodeImpl accessControlledNode = (NodeImpl) aclNode.getParent();
           
            if (isAccessControlled(accessControlledNode)) {
                if (permissions.canRead(aclNode.getPrimaryPath(), aclNode.getNodeId())) {
                    List<AccessControlEntry> aces = entryCollector.getEntries(accessControlledNode).getACEs();
                    acls.add(new UnmodifiableAccessControlList(aces, accessControlledNode.getPath(), Collections.<String, Integer>emptyMap()));
                } else {
                    throw new AccessDeniedException("Access denied at " + Text.getRelativeParent(aclNode.getPath(), 1));
                }
            }
        }
View Full Code Here

Examples of org.apache.jackrabbit.core.security.authorization.UnmodifiableAccessControlList

        // it to the list
        if (isAccessControlled(node)) {
            if (permissions.grants(node.getPrimaryPath(), Permission.READ_AC)) {
                // retrieve the entries for the access controlled node
                List<AccessControlEntry> aces = entryCollector.getEntries(node).getACEs();
                acls.add(new UnmodifiableAccessControlList(aces, node.getPath(), Collections.<String, Integer>emptyMap()));
            } else {
                throw new AccessDeniedException("Access denied at " + node.getPath());
            }
        }
        // then, recursively look for access controlled parents up the hierarchy.
View Full Code Here

Examples of org.apache.jackrabbit.core.security.authorization.UnmodifiableAccessControlList

            targetNode = (NodeImpl) session.getRootNode();
            if (isRepoAccessControlled(targetNode)) {
                if (permissions.grants(targetNode.getPrimaryPath(), Permission.READ_AC)) {
                    // retrieve the entries for the access controlled node
                    List<AccessControlEntry> entries = entryCollector.collectEntries(null, new EntryFilterImpl(null, (NodeId) null, session));
                    acls.add(new UnmodifiableAccessControlList(entries));
                } else {
                    throw new AccessDeniedException("Access denied at " + targetNode.getPath());
                }
            }
        } else {
View Full Code Here

Examples of org.apache.jackrabbit.core.security.authorization.UnmodifiableAccessControlList

            NodeImpl accessControlledNode = (NodeImpl) aclNode.getParent();

            if (N_POLICY.equals(aclName) && isAccessControlled(accessControlledNode)) {
                if (permissions.canRead(aclNode.getPrimaryPath(), aclNode.getNodeId())) {
                    List<AccessControlEntry> aces = entryCollector.getEntries(accessControlledNode).getACEs();
                    acls.add(new UnmodifiableAccessControlList(aces, accessControlledNode.getPath(), Collections.<String, Integer>emptyMap()));
                } else {
                    throw new AccessDeniedException("Access denied at " + Text.getRelativeParent(aclNode.getPath(), 1));
                }
            } else if (N_REPO_POLICY.equals(aclName) && isRepoAccessControlled(accessControlledNode)) {
                if (permissions.canRead(aclNode.getPrimaryPath(), aclNode.getNodeId())) {
                    List<AccessControlEntry> aces = entryCollector.collectEntries(null, new EntryFilterImpl(null, (NodeId) null, session));
                    acls.add(new UnmodifiableAccessControlList(aces));
                } else {
                    throw new AccessDeniedException("Access denied at " + Text.getRelativeParent(aclNode.getPath(), 1));
                }
            } // else: not a regular policy node -> ignore.
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.