Examples of RoleImpl


Examples of org.apache.felix.useradmin.impl.role.RoleImpl

    /**
     * Tests that without permission, the {@link GroupImpl#addRequiredMember(Role)} method can not be accessed.
     */
    public void testAddRequiredMemberWithoutPermissionsFail() throws SecurityException {
        try {
            m_group.addRequiredMember(new RoleImpl(Role.USER_ANYONE));
           
            fail("Security exception expected!");
        } catch (SecurityException e) {
            // Ok; expected
        }
View Full Code Here

Examples of org.apache.felix.useradmin.impl.role.RoleImpl

     * Tests that with permission, the {@link GroupImpl#removeMember(Role)} method can be accessed.
     */
    public void testRemoveMemberWithPermissionsOk() throws SecurityException {
        m_securityManager.m_allowed = true;
       
        assertFalse(m_group.removeMember(new RoleImpl(Role.USER_ANYONE)));
    }
View Full Code Here

Examples of org.apache.felix.useradmin.impl.role.RoleImpl

    /**
     * Tests that without permission, the {@link GroupImpl#removeMember(Role)} method can not be accessed.
     */
    public void testRemoveMemberWithoutPermissionsFail() throws SecurityException {
        try {
            assertFalse(m_group.removeMember(new RoleImpl(Role.USER_ANYONE)));

            fail("Security exception expected!");
        } catch (SecurityException e) {
            // Ok; expected
        }
View Full Code Here

Examples of org.apache.felix.useradmin.impl.role.RoleImpl

            return result;
        } else if (type == Role.GROUP) {
            GroupImpl result = new GroupImpl(name);
            return result;
        } else {
            RoleImpl result = new RoleImpl(name);
            return result;
        }
    }
View Full Code Here

Examples of org.apache.jetspeed.security.impl.RoleImpl

        }
        if (!hasPortalUserRole)
        {
            // add portal user role: used in web.xml authorization to
            // detect authenticated portal users
            roles.addMember(new RoleImpl(portalUserRole));       
        }
        subject.getPrincipals().add(roles);
    }
View Full Code Here

Examples of org.apache.jetspeed.security.impl.RoleImpl

        Set principals = new PrincipalsSet();
        Set publicCredentials = new HashSet();
        Set privateCredentials = new HashSet();
       
        principals.add(new UserImpl("david"));
        principals.add(new RoleImpl("ATP"));
        principals.add(new RoleImpl("NB"));       
        principals.add(new RoleImpl("ATP-NB"));
       
        Subject subject = new Subject(true, principals, publicCredentials, privateCredentials);       
        return subject;
    }
View Full Code Here

Examples of org.apache.jetspeed.security.impl.RoleImpl

        Set principals = new PrincipalsSet();
        Set publicCredentials = new HashSet();
        Set privateCredentials = new HashSet();

        principals.add(new UserImpl("david"));
        principals.add(new RoleImpl("ATP"));
        principals.add(new RoleImpl("NB"));
       
        Subject subject = new Subject(true, principals, publicCredentials, privateCredentials);       
        return subject;
    }
View Full Code Here

Examples of org.apache.jetspeed.security.impl.RoleImpl

                return "someNonJetspeedPrincipal";
            }
           
        });
        // add a Jetspeed role principal ==> should be ignored as well
        s.getPrincipals().add(new RoleImpl("someRole"));
       
        users = ssoManager.getRemoteUsers(testSite,s);
        assertEquals(2,users.size());

        ssoManager.addUser(testSite, testuser, "someRemoteUser", "someRemotePwd");
View Full Code Here

Examples of org.apache.jetspeed.security.impl.RoleImpl

        Set principals = new PrincipalsSet();
        Set publicCredentials = new HashSet();
        Set privateCredentials = new HashSet();
       
        principals.add(new UserImpl("david"));
        principals.add(new RoleImpl("ATP"));
        principals.add(new RoleImpl("NB"));       
        principals.add(new RoleImpl("ATP-NB"));
       
        Subject subject = new Subject(true, principals, publicCredentials, privateCredentials);       
        return subject;
    }
View Full Code Here

Examples of org.apache.jetspeed.security.impl.RoleImpl

        Set principals = new PrincipalsSet();
        Set publicCredentials = new HashSet();
        Set privateCredentials = new HashSet();

        principals.add(new UserImpl("david"));
        principals.add(new RoleImpl("ATP"));
        principals.add(new RoleImpl("NB"));
       
        Subject subject = new Subject(true, principals, publicCredentials, privateCredentials);       
        return subject;
    }
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.