Here's the code in my subclass:

  |     /**
  |      * This is required by the parent class. It puts the gargantus role
  |      * objects which we fetched during login() into a group
  |      * for the parent class to commit.
  |      * @return group array containing the Roles group
  |      */
  |     protected Group[] getRoleSets() throws LoginException
  |     {
  |         log.trace("getRoleSets() returning " + this.roles.toString());
  | 
  |         Group groups[] = new Group[1];
  |         Set principals = super.subject.getPrincipals();
  |         
  |         //next line creates NestedGroup - tomcat doesn't see it
  |         //groups[0] = super.createGroup("Roles", principals);
  | 
  |         //next 2 lines instead of JBoss superclass:
  |         groups[0] = new SimpleGroup("Roles");
  |         principals.add(groups[0]);
  | 
  |         for (int x = 0; x < roles.size(); x++)
  |         {
  |             GargantusRole role = (GargantusRole) this.roles.get(x);
  |             groups[0].addMember(new NestablePrincipal(role.getName()));
  |         }
  |         log.trace("adding our roles to subject");
  | 
  |         return groups;
  |     }        
  | 
  | 

I get the following trace from the security manager afterwards that confirms this: 
(when using super.createGroup(), the roles trace shows no roles)

TRACE [org.jboss.security.plugins.JaasSecurityManager.GargantusRealm] updateCache, 
subject=Subject:
  |         Principal: GargantusUser:  adam
  |         Principal: Roles(members:user,admin,manager)
  | 

<a 
href="http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3825954#3825954";>View 
the original post</a>

<a 
href="http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3825954>Reply 
to the post</a>


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to