acls.add(getACL(accessControlledNode, N_POLICY, accessControlledNode.getPath())); } else { throw new AccessDeniedException("Access denied at " + Text.getRelativeParent(aclNode.getPath(), 1)); acls.add(getACL(accessControlledNode, N_REPO_POLICY, null)); } else { throw new AccessDeniedException("Access denied at " + Text.getRelativeParent(aclNode.getPath(), 1));
acls.add(getACL(accessControlledNode, N_POLICY, accessControlledNode.getPath())); } else { throw new AccessDeniedException("Access denied at " + Text.getRelativeParent(aclNode.getPath(), 1)); acls.add(getACL(accessControlledNode, N_REPO_POLICY, null)); } else { throw new AccessDeniedException("Access denied at " + Text.getRelativeParent(aclNode.getPath(), 1));
if (isRepoAccessControlled(targetNode)) { if (permissions.grants(targetNode.getPrimaryPath(), Permission.READ_AC)) { acls.add(getACL(targetNode, N_REPO_POLICY, null)); } else { throw new AccessDeniedException("Access denied at " + targetNode.getPath());
if (isRepoAccessControlled(targetNode)) { if (permissions.grants(targetNode.getPrimaryPath(), Permission.READ_AC)) { acls.add(getACL(targetNode, N_REPO_POLICY, null)); } else { throw new AccessDeniedException("Access denied at " + targetNode.getPath());
/** * Recursively collects all ACLs that are effective on the specified node. * * @param node the Node to collect the ACLs for, which must NOT be part of the * structure defined by mix:AccessControllable. * @param permissions * @param acls List used to collect the effective acls. * @throws RepositoryException if an error occurs */ private void collectAcls(NodeImpl node, CompiledPermissions permissions, List<AccessControlList> acls) throws RepositoryException { // 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)) { acls.add(getACL(node, N_POLICY, node.getPath())); } else { throw new AccessDeniedException("Access denied at " + node.getPath()); } } // then, recursively look for access controlled parents up the hierarchy. if (!rootNodeId.equals(node.getId())) { NodeImpl parentNode = (NodeImpl) node.getParent(); collectAcls(parentNode, permissions, acls); } }
/** * Recursively collects all ACLs that are effective on the specified node. * * @param node the Node to collect the ACLs for, which must NOT be part of the * structure defined by mix:AccessControllable. * @param permissions * @param acls List used to collect the effective acls. * @throws RepositoryException if an error occurs */ private void collectAcls(NodeImpl node, CompiledPermissions permissions, List<AccessControlList> acls) throws RepositoryException { // 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)) { acls.add(getACL(node, N_POLICY, node.getPath())); } else { throw new AccessDeniedException("Access denied at " + node.getPath()); } } // then, recursively look for access controlled parents up the hierarchy. if (!rootNodeId.equals(node.getId())) { NodeImpl parentNode = (NodeImpl) node.getParent(); collectAcls(parentNode, permissions, acls); } }