[jbossseam-issues] [JBoss JIRA] Closed: (JBSEAM-1976) Add org.jboss.seam.security.Identity.getRoleNames()

Shane Bryzak (JIRA) jira-events at lists.jboss.org
Mon Oct 15 05:33:03 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBSEAM-1976?page=all ]

Shane Bryzak closed JBSEAM-1976.
--------------------------------

    Resolution: Rejected
      Assignee: Shane Bryzak

Roles aren't stored consistently across implementations, so this isn't practical.  I recommend that you query the db (or wherever the roles are loaded from) to get a list of roles assigned to the user, otherwise wait for JBSEAM-730.

> Add org.jboss.seam.security.Identity.getRoleNames()
> ---------------------------------------------------
>
>                 Key: JBSEAM-1976
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1976
>             Project: JBoss Seam
>          Issue Type: Patch
>          Components: Security
>    Affects Versions: 1.2.1.GA
>            Reporter: jarkko Lietolahti
>         Assigned To: Shane Bryzak
>
> Add new method (e.g.) getRoleNames which returns a list of role names (or either Group.classes).
> This is because I need to check if the current user has any roles at all. And currently I need to write:
> Set roles = Identity.instance().getSubject().getPrincipals(Group.class);
> if (roles.isEmpty()) {
>       return null; // user without any roles
> }
> And I'd like to be able to write:
> Identity.instance().getRoleNames().isEmpty();
> What do you think?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list