Examples of GroupPrincipal


Examples of com.google.enterprise.adaptor.GroupPrincipal

    assertEquals(1, groups.size());

    Set<GroupPrincipal> groupSet = groups.keySet();
    Set<GroupPrincipal> expectedGroupSet =
        ImmutableSet.of(new GroupPrincipal("group1", LOCAL_NAMESPACE));
    assertEquals(expectedGroupSet, groupSet);

    Collection<Principal> users = groups.get(groupSet.iterator().next());
    assertTrue(users.isEmpty());
  }
View Full Code Here

Examples of de.iritgo.aktera.authentication.GroupPrincipal

        Persistent oneMember = null;

        for (Iterator gi = memberOf.iterator(); gi.hasNext();)
        {
          oneMember = (Persistent) gi.next();
          p = new GroupPrincipal(oneMember.getFieldString("groupname"));
          s.add(p);
        }
      }
      catch (PersistenceException e)
      {
View Full Code Here

Examples of java.nio.file.attribute.GroupPrincipal

            // than a UID. That may cause problems for NPM, which may try to use a UID.
            try {
                UserPrincipal user = lookupService.lookupPrincipalByName(uid);
               
                if (Platform.get().isPosixFilesystem()) {
                    GroupPrincipal group = lookupService.lookupPrincipalByGroupName(gid);
   
                    if (noFollow) {
                        Files.setAttribute(path, "posix:owner", user, LinkOption.NOFOLLOW_LINKS);
                        Files.setAttribute(path, "posix:group", group, LinkOption.NOFOLLOW_LINKS);
                    } else {
View Full Code Here

Examples of org.apache.activemq.jaas.GroupPrincipal

            if (anonymousAccessAllowed && info.getUserName() == null && info.getPassword() == null) {
                info.setUserName(anonymousUser);
                s = new SecurityContext(info.getUserName()) {
                    public Set getPrincipals() {
                        Set groups = new HashSet();
                        groups.add(new GroupPrincipal(anonymousGroup));
                        return groups;
                    }
                };
            } else {
                String pw = (String) userPasswords.get(info.getUserName());
View Full Code Here

Examples of org.apache.activemq.jaas.GroupPrincipal

    @Test
    public void testGetAdminACLs() {
        ActiveMQDestination q1 = new ActiveMQQueue("queue1");
        Set aclsq1 = authMap.getAdminACLs(q1);
        assertEquals(1, aclsq1.size());
        assertTrue(aclsq1.contains(new GroupPrincipal("role1")));

        ActiveMQDestination t1 = new ActiveMQTopic("topic1");
        Set aclst1 = authMap.getAdminACLs(t1);
        assertEquals(1, aclst1.size());
        assertTrue(aclst1.contains(new GroupPrincipal("role1")));
    }
View Full Code Here

Examples of org.apache.activemq.jaas.GroupPrincipal

    @Test
    public void testGetReadACLs() {
        ActiveMQDestination q1 = new ActiveMQQueue("queue1");
        Set aclsq1 = authMap.getReadACLs(q1);
        assertEquals(1, aclsq1.size());
        assertTrue(aclsq1.contains(new GroupPrincipal("role1")));

        ActiveMQDestination t1 = new ActiveMQTopic("topic1");
        Set aclst1 = authMap.getReadACLs(t1);
        assertEquals(1, aclst1.size());
        assertTrue(aclst1.contains(new GroupPrincipal("role2")));
    }
View Full Code Here

Examples of org.apache.activemq.jaas.GroupPrincipal

    @Test
    public void testGetWriteACLs() {
        ActiveMQDestination q1 = new ActiveMQQueue("queue1");
        Set aclsq1 = authMap.getWriteACLs(q1);
        assertEquals(2, aclsq1.size());
        assertTrue(aclsq1.contains(new GroupPrincipal("role1")));
        assertTrue(aclsq1.contains(new GroupPrincipal("role2")));

        ActiveMQDestination t1 = new ActiveMQTopic("topic1");
        Set aclst1 = authMap.getWriteACLs(t1);
        assertEquals(1, aclst1.size());
        assertTrue(aclst1.contains(new GroupPrincipal("role3")));
    }
View Full Code Here

Examples of org.apache.activemq.jaas.GroupPrincipal

    public void testAdvisory() {
        ActiveMQDestination dest = AdvisorySupport.getConnectionAdvisoryTopic();
        Set acls = authMap.getWriteACLs(dest);

        assertEquals(1, acls.size());
        assertTrue(acls.contains(new GroupPrincipal("role3")));
    }
View Full Code Here

Examples of org.apache.activemq.jaas.GroupPrincipal

        @Test
    public void testTemp() {
        Set acls = authMap.getTempDestinationAdminACLs();

        assertEquals(1, acls.size());
        assertTrue(acls.contains(new GroupPrincipal("role1")));
    }
View Full Code Here

Examples of org.apache.activemq.jaas.GroupPrincipal

        Attribute member = result.getAttributes().get("member");
        NamingEnumeration<?> memberEnum = member.getAll();
        HashSet<Object> members = new HashSet<Object>();
        while (memberEnum.hasMoreElements()) {
            String elem = (String) memberEnum.nextElement();
            members.add(new GroupPrincipal(elem.replaceAll("cn=", "")));
        }

        // apply privilege
        if (cn.get().equals("admin")) {
            entry.setAdminACLs(members);
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.