Examples of GroupPrincipal


Examples of org.apache.servicemix.jbi.security.GroupPrincipal

    public void setRoles(String roles) {
        this.acls = new HashSet();
        StringTokenizer iter = new StringTokenizer(roles, ",");
        while (iter.hasMoreTokens()) {
            String name = iter.nextToken().trim();
            this.acls.add(new GroupPrincipal(name));
        }
    }
View Full Code Here

Examples of org.apache.servicemix.jbi.security.GroupPrincipal

   
    public String getRoles() {
        StringBuffer sb = new StringBuffer();
        if (this.acls != null) {
            for (Iterator iter = this.acls.iterator(); iter.hasNext();) {
                GroupPrincipal p = (GroupPrincipal) iter.next();
                sb.append(p);
                if (iter.hasNext()) {
                    sb.append(",");
                }
            }
View Full Code Here

Examples of org.apache.servicemix.nmr.api.security.GroupPrincipal

        DefaultAuthorizationEntry entry = new DefaultAuthorizationEntry();
        entry.setRoles("role1, role2");
        Set<GroupPrincipal> acls = entry.getAcls();
        assertNotNull(acls);
        assertEquals(2, acls.size());
        assertTrue(acls.contains(new GroupPrincipal("role1")));
        assertTrue(acls.contains(new GroupPrincipal("role2")));
    }
View Full Code Here

Examples of org.apache.wiki.auth.GroupPrincipal

        {
            Command command = m_wikiContext.getCommand();
            gotPermission = false;
            if ( command instanceof GroupCommand && command.getTarget() != null )
            {
                GroupPrincipal group = (GroupPrincipal)command.getTarget();
                String groupName = group.getName();
                String action = "view";
                if( EDIT_GROUP.equals( permission ) )
                {
                    action = "edit";
                }
View Full Code Here

Examples of org.apache.wiki.auth.GroupPrincipal

     */
    protected Group( String name, String wiki )
    {
        m_name = name;
        m_wiki = wiki;
        m_principal = new GroupPrincipal( name );
    }
View Full Code Here

Examples of org.apache.wiki.auth.GroupPrincipal

        m_queue = m_engine.getWorkflowManager().getDecisionQueue();
        adminSession = m_engine.adminSession();
        janneSession = m_engine.janneSession();
        w = new Workflow("workflow.key", new WikiPrincipal("Owner1"));
        w.setWorkflowManager(m_engine.getWorkflowManager());
        d1 = new SimpleDecision(w, "decision1.key", new GroupPrincipal("Admin"));
        d2 = new SimpleDecision(w, "decision2.key", new WikiPrincipal("Owner2"));
        d3 = new SimpleDecision(w, "decision3.key", janneSession.getUserPrincipal());
        m_queue.add(d1);
        m_queue.add(d2);
        m_queue.add(d3);
View Full Code Here

Examples of org.apache.wiki.auth.GroupPrincipal

    public void testGetApprover() throws WikiException
    {
        // Test properties says workflow.saveWikiPage approver is GP Admin; workflow.foo is 'janne'
        assertEquals(new WikiPrincipal("janne", WikiPrincipal.LOGIN_NAME), wm.getApprover("workflow.foo"));
        assertEquals(new GroupPrincipal("Admin"), wm.getApprover("workflow.bar"));
       
        // 'saveWikiPage' workflow doesn't require approval, so we will need to catch an Exception
        try
        {
            assertEquals(new GroupPrincipal("Admin"), wm.getApprover("workflow.saveWikiPage"));
        }
        catch (WikiException e)
        {
            // Swallow
            return;
View Full Code Here

Examples of org.switchyard.security.principal.GroupPrincipal

    }

    private Set<Credential> getCredentials() throws Exception {
        UserPrincipal user = new UserPrincipal("testUser");
        RolePrincipal role = new RolePrincipal("testRole");
        GroupPrincipal parentGroup = new GroupPrincipal("testParentGroup");
        parentGroup.addMember(user);
        GroupPrincipal childGroup = new GroupPrincipal("testChildGroup");
        childGroup.addMember(role);
        parentGroup.addMember(childGroup);
        Set<Credential> creds = new LinkedHashSet<Credential>();
        creds.add(new AssertionCredential(new ElementPuller().pull(new StringReader("<testAssertion/>"))));
        creds.add(SOAPMessageCredentialExtractorTests.getBinarySecurityTokenCertificateCredential());
        creds.add(new ConfidentialityCredential(true));
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.