Examples of CugPolicy


Examples of org.apache.jackrabbit.oak.spi.security.authorization.cug.CugPolicy

    }

    public AccessControlPolicy[] getPolicies(String absPath) throws RepositoryException {
        String oakPath = getOakPath(absPath);
        if (isSupportedPath(oakPath)) {
            CugPolicy cug = getCugPolicy(oakPath);
            if (cug != null) {
                return new AccessControlPolicy[]{cug};
            }
        }
        return new AccessControlPolicy[0];
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.security.authorization.cug.CugPolicy

        Root r = getRoot().getContentSession().getLatestRoot();
        List<AccessControlPolicy> effective = new ArrayList<AccessControlPolicy>();
        while (!Strings.isNullOrEmpty(oakPath)) {
            if (isSupportedPath(oakPath)) {
                CugPolicy cug = getCugPolicy(oakPath, r.getTree(oakPath));
                if (cug != null) {
                    effective.add(cug);
                }
            }
            oakPath = Text.getRelativeParent(oakPath, 1);
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.security.authorization.cug.CugPolicy

    public AccessControlPolicyIterator getApplicablePolicies(String absPath) throws RepositoryException {
        String oakPath = getOakPath(absPath);
        if (!isSupportedPath(oakPath)) {
            return AccessControlPolicyIteratorAdapter.EMPTY;
        } else {
            CugPolicy cug = getCugPolicy(oakPath);
            if (cug == null) {
                return new AccessControlPolicyIteratorAdapter(ImmutableSet.of(new CugPolicyImpl(oakPath, getNamePathMapper(), principalManager, CugUtil.getImportBehavior(config))));
            } else {
                return AccessControlPolicyIteratorAdapter.EMPTY;
            }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.security.authorization.cug.CugPolicy

    private static void checkValidPolicy(@Nullable String absPath, @Nonnull AccessControlPolicy policy) throws AccessControlException {
        if (!(policy instanceof CugPolicyImpl)) {
            throw new AccessControlException("Unsupported policy implementation: " + policy);
        }

        CugPolicy cug = (CugPolicy) policy;
        if (!cug.getPath().equals(absPath)) {
            throw new AccessControlException("Path mismatch: Expected " + cug.getPath() + ", Found: " + absPath);
        }
    }
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.