You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shiro.apache.org by "Mikko Kortelainen (Jira)" <ji...@apache.org> on 2023/12/21 08:25:00 UTC

[jira] [Commented] (SHIRO-492) Subject.getRoles() functionality

    [ https://issues.apache.org/jira/browse/SHIRO-492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17799299#comment-17799299 ] 

Mikko Kortelainen commented on SHIRO-492:
-----------------------------------------

We'd need this as well, it is not very comfortable to create custom methods in each AuthorizingRealm implementation to provide public access to the roles. Roles are needed in our application so user can share their created works with other users by giving a role they are member-of. Of course this could work by blindly allowing them to input the role and then check against currently assigned roles and then allow the role assignment of the works, but UX is plain horrible in this case as some have quite difficult role names.

> Subject.getRoles() functionality
> --------------------------------
>
>                 Key: SHIRO-492
>                 URL: https://issues.apache.org/jira/browse/SHIRO-492
>             Project: Shiro
>          Issue Type: Improvement
>          Components: Authorization (access control) 
>            Reporter: John Vines
>            Priority: Major
>             Fix For: 2.0.0
>
>
> Currently shiro provides the ability to respond whether or not a user has a list of Authorizations. However, while the realms have methods for getting all authorizations (protected), these are not exposed in normal use to allow asking for all Roles. This should be exposed by adding a call to Subject to getRoles, to complement it's existing hasRoles calls. This may require making some of the calls around authorizations, like getAuthorizationInfo in AuthorizingRealm, public. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@shiro.apache.org
For additional commands, e-mail: issues-help@shiro.apache.org