List of usage examples for java.security.acl Group members
public Enumeration<? extends Principal> members();
From source file:org.nuxeo.ecm.platform.login.NuxeoAbstractServerLoginModule.java
public boolean commit() throws LoginException { log.trace("commit, loginOk=" + loginOk); if (!loginOk) { return false; }//from w w w . j a v a2s .c o m Set<Principal> principals = subject.getPrincipals(); Principal identity = getIdentity(); principals.add(identity); Group[] roleSets = getRoleSets(); for (Group group : roleSets) { String name = group.getName(); Group subjectGroup = createGroup(name, principals); /* * if( subjectGroup instanceof NestableGroup ) { SimpleGroup tmp = new SimpleGroup("Roles"); * subjectGroup.addMember(tmp); subjectGroup = tmp; } */ // Copy the group members to the Subject group Enumeration<? extends Principal> members = group.members(); while (members.hasMoreElements()) { Principal role = members.nextElement(); subjectGroup.addMember(role); } } return true; }