Hi;
Can anybody help me on how to return an array of Group to the super class in my customizable LoginModule?
Here is the method i am overriding....
protected Group[] getRoleSets() throws LoginException {
String targetUser = getUsername();
Group[] roleSets =null;
????????
???????? // TO DO: Add 2 roles "Admin","Supervisor"
????????
return roleSets;
}
I would like to return two roles "Admin" and "Supervisor" in the above method. These are static roles for now. More roles in future for your solution.
Thanks in advance...
Eswar
Group grp = new SimpleGroup("Roles"); grp.addMember(new SimplePrincipal("role1"); grp.addMember(new SimplePrincipal("role2"); return new Group[]{grp};