Examples of removeMember()


Examples of org.apache.jackrabbit.api.security.user.Group.removeMember()

        Authorizable cU = umgr.getAuthorizable(getYetAnotherID());

        Group gr = (Group) umgr.getAuthorizable(groupAdmin.getID());
        assertTrue(gr.addMember(cU));
        save(uSession);
        assertTrue(gr.removeMember(cU));
        save(uSession);
    }

    public void testAddMembersToCreatedGroup() throws RepositoryException, NotExecutableException {
        UserManager umgr = getUserManager(uSession);
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.Group.removeMember()

            assertTrue(testGroup.addMember(testUser));
            save(uSession);
        } finally {
            if (testGroup != null) {
                for (Iterator<Authorizable> it = testGroup.getDeclaredMembers(); it.hasNext();) {
                    testGroup.removeMember(it.next());
                }
                testGroup.remove();
                save(uSession);
            }
        }
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.Group.removeMember()

        try {
            assertTrue(gr.addMember(pU));
            save(uSession);
        } finally {
            gr.removeMember(pU);
            save(uSession);
        }
    }

    public void testAddOwnAuthorizableAsGroupAdmin() throws RepositoryException, NotExecutableException {
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.Group.removeMember()

        Authorizable user = umgr.getAuthorizable(uID);
        Group gr = (Group) umgr.getAuthorizable(groupAdmin.getID());

        // removing himself from group. should succeed.
        assertTrue(gr.removeMember(user));
    }

    public void testAddOwnAuthorizableToForeignGroup() throws RepositoryException, NotExecutableException {
        UserManager umgr = getUserManager(uSession);
        Authorizable self = umgr.getAuthorizable(uID);
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.Group.removeMember()

            Iterator<Authorizable> it = gr.getMembers();
            if (it.hasNext()) {
                Authorizable auth = it.next();

                String msg = "GroupAdmin must be able to modify group membership.";
                assertTrue(msg, gr.removeMember(auth));
                save(uSession);
            } else {
                fail("Must contain members....");
            }
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.Group.removeMember()

            // since uSession is not user-admin this must fail.
            for (Iterator<Authorizable> it = gr.getMembers(); it.hasNext();) {
                Authorizable auth = it.next();

                String msg = "GroupAdmin must be able to remove a member of another group.";
                assertTrue(msg, gr.removeMember(auth));
                save(uSession);
            }
        } catch (AccessDeniedException e) {
            // fine as well.
        } finally {
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.Group.removeMember()

            }

            fail("User principal " + up.getName() + " must have inherited group membership for " + gr1.getPrincipal().getName());

        } finally {
            if (gr2 != null && u != null) gr2.removeMember(u);
            if (gr1 != null && gr2 != null) gr1.removeMember(gr2);

            if (gr1 != null) gr1.remove();
            if (gr2 != null) gr2.remove();
            if (u != null) u.remove();
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.Group.removeMember()

                        }
                    }

                    // 2. adjust members of the group
                    for (Authorizable m : toRemove.values()) {
                        if (!gr.removeMember(m)) {
                            handleFailure("Failed remove existing member (" + m + ") from " + gr);
                        }
                    }
                    for (Authorizable m : toAdd) {
                        if (!gr.addMember(m)) {
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.Group.removeMember()

                }
            }

            // 2. adjust members of the group
            for (Authorizable m : toRemove.values()) {
                if (!gr.removeMember(m)) {
                    handleFailure("Failed remove existing member (" + m + ") from " + gr);
                }
            }
            for (Authorizable m : toAdd) {
                if (!gr.addMember(m)) {
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.Group.removeMember()

                        }
                    }

                    // 2. adjust members of the group
                    for (Authorizable m : toRemove.values()) {
                        if (!gr.removeMember(m)) {
                            handleFailure("Failed remove existing member (" + m + ") from " + gr);
                        }
                    }
                    for (Authorizable m : toAdd) {
                        if (!gr.addMember(m)) {
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.