Examples of memberOf()


Examples of org.apache.jackrabbit.api.security.user.Authorizable.memberOf()

                        return true;
                    }

                    // check groups
                    @SuppressWarnings("unchecked")
                    Iterator<Group> gi = a.memberOf();
                    while (gi.hasNext()) {
                        if (groups.contains(gi.next().getID())) {
                            return userName;
                        }
                    }
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.Authorizable.memberOf()

                    return (User)a;
                }

                // check groups
                @SuppressWarnings("unchecked")
                Iterator<Group> gi = a.memberOf();
                while (gi.hasNext()) {
                    if (groups.contains(gi.next().getID())) {
                        return (User)a;
                    }
                }
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.Authorizable.memberOf()

                otherSession.logout();
            }
        } finally {
            Authorizable a = userMgr.getAuthorizable(otherUID);
            if (a != null) {
                for (Iterator<Group> it = a.memberOf(); it.hasNext();) {
                    Group gr = it.next();
                    if (!gr.getPrincipal().equals(EveryonePrincipal.getInstance())) {
                        gr.removeMember(a);
                    }
                }
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.Authorizable.memberOf()

        final Set<Principal> membership = new LinkedHashSet<Principal>();
            try {
                final Authorizable auth = userManager.getAuthorizable(princ);
                if (auth != null) {
                    addToCache(princ);
                    Iterator<Group> itr = auth.memberOf();
                    while (itr.hasNext()) {
                        Group group = itr.next();
                        Principal gp = group.getPrincipal();
                        addToCache(gp);
                        membership.add(gp);
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.Authorizable.memberOf()

                    however, avoid putting the given 'princ' but assert that
                    the cached principal is obtained with the system session
                    used to deliver principals with this provider implementation.
                    */
                    addToCache(auth.getPrincipal());
                    Iterator<Group> itr = auth.memberOf();
                    while (itr.hasNext()) {
                        Group group = itr.next();
                        Principal gp = group.getPrincipal();
                        addToCache(gp);
                        membership.add(gp);
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.Authorizable.memberOf()

                otherSession.logout();
            }
        } finally {
            Authorizable a = userMgr.getAuthorizable(otherUID);
            if (a != null) {
                for (Iterator it = a.memberOf(); it.hasNext();) {
                    Group gr = (Group) it.next();
                    if (!gr.getPrincipal().equals(EveryonePrincipal.getInstance())) {
                        gr.removeMember(a);
                    }
                }
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.Authorizable.memberOf()

                    however, avoid putting the given 'princ' but assert that
                    the cached principal is obtained with the system session
                    used to deliver principals with this provider implementation.
                    */
                    addToCache(auth.getPrincipal());
                    Iterator<Group> itr = auth.memberOf();
                    while (itr.hasNext()) {
                        Group group = itr.next();
                        Principal gp = group.getPrincipal();
                        addToCache(gp);
                        membership.add(gp);
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.Authorizable.memberOf()

        final Set<Principal> membership = new LinkedHashSet<Principal>();
            try {
                final Authorizable auth = userManager.getAuthorizable(princ);
                if (auth != null) {
                    addToCache(princ);
                    Iterator<Group> itr = auth.memberOf();
                    while (itr.hasNext()) {
                        Group group = itr.next();
                        Principal gp = group.getPrincipal();
                        addToCache(gp);
                        membership.add(gp);
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.Authorizable.memberOf()

        Set<Principal> membership = new LinkedHashSet<Principal>();
            try {
                Authorizable auth = userManager.getAuthorizable(princ);
                if (auth != null) {
                    addToCache(princ);
                    Iterator<Group> itr = auth.memberOf();
                    while (itr.hasNext()) {
                        Group group = itr.next();
                        Principal gp = group.getPrincipal();
                        addToCache(gp);
                        membership.add(gp);
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.Authorizable.memberOf()

        boolean isJackrabbitSession = session instanceof JackrabbitSession;
        if (!isAdministrator) {
            if (isJackrabbitSession) {
                JackrabbitSession jackrabbitSession = (JackrabbitSession) session;
                Authorizable authorizable = jackrabbitSession.getUserManager().getAuthorizable(userId);
                Iterator<Group> groupIterator = authorizable.memberOf();
                while (groupIterator.hasNext()) {
                    if (ADMINISTRATORS_GROUP.equals(groupIterator.next().getID())) {
                        isAdministrator = true;
                        break;
                    }
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.