Package org.apache.jackrabbit.oak.spi.security.user

Examples of org.apache.jackrabbit.oak.spi.security.user.MembershipProvider


    private Iterator<Group> getMembership(boolean includeInherited) throws RepositoryException {
        if (isEveryone()) {
            return Collections.<Group>emptySet().iterator();
        }

        MembershipProvider mMgr = userManager.getMembershipProvider();
        Iterator<String> oakPaths = mMgr.getMembership(tree, includeInherited);
        if (oakPaths.hasNext()) {
            AuthorizableIterator groups = AuthorizableIterator.create(oakPaths, userManager, UserManager.SEARCH_TYPE_GROUP);
            return new RangeIteratorAdapter(groups, groups.getSize());
        } else {
            return RangeIteratorAdapter.EMPTY;
View Full Code Here


            return false;
        }
        if (isEveryone()) {
            return false;
        } else {
            MembershipProvider mMgr = getUserManager().getMembershipProvider();
            return mMgr.removeMember(getTree(), ((AuthorizableImpl) authorizable).getTree());
        }
    }
View Full Code Here

        if (isEveryone()) {
            // TODO: improve using authorizable-query
            String propName = getJcrName(REP_PRINCIPAL_NAME);
            return uMgr.findAuthorizables(propName, null, UserManager.SEARCH_TYPE_AUTHORIZABLE);
        } else {
            MembershipProvider mMgr = uMgr.getMembershipProvider();
            Iterator oakPaths = mMgr.getMembers(getTree(), Type.AUTHORIZABLE, includeInherited);
            if (!oakPaths.hasNext()) {
                AuthorizableIterator iterator = AuthorizableIterator.create(oakPaths, uMgr, UserManager.SEARCH_TYPE_AUTHORIZABLE);
                return new RangeIteratorAdapter(iterator, iterator.getSize());
            } else {
                return RangeIteratorAdapter.EMPTY;
View Full Code Here

            return true;
        } else if (getID().equals(authorizable.getID())) {
            return false;
        } else {
            Tree authorizableTree = ((AuthorizableImpl) authorizable).getTree();
            MembershipProvider mgr = getUserManager().getMembershipProvider();
            return mgr.isMember(this.getTree(), authorizableTree, includeInherited);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.spi.security.user.MembershipProvider

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.