shiro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Les Hazlewood <lhazlew...@apache.org>
Subject Re: Reading Permissions given a Subject
Date Tue, 16 Mar 2010 02:50:56 GMT
Hi Rich,

There currently isn't any direct support for this on the Subject API.
We have avoided it thus far because maintaining a merged copy across
all realms would generally mean that the state could become stale if
any of the underlying realms change the data and/or associations at
runtime (an expected/supported condition in Shiro).

Existing Realms can manage this state today typically by subclassing
AuthorizingRealm and using a cache to store AuthorizationInfo.   If
data and/or associations change, it is the implementor's
responsibility to clear out any cached state by calling the
clearCachedAuthorizationInfo method.

But this is typically looked at as very implementation specific - not
all realms need this functionality or should necessarily be forced to
support it, which is why it's not available in the Realm or Subject
API.

But that's not to say we can't support this some way - it just hasn't
been designed yet.  Please open a Jira issue for a new feature if
you'd like and discuss it on the dev list.

HTH,

Les

On Thu, Mar 4, 2010 at 3:37 PM, rchristy <rchristy@skyroadasp.com> wrote:
>
> Hello All,
>
> I have a use case where I would like to retrieve all the permissions/roles
> for a subject.  I realize the data is in each realm, but is there a way that
> given a subject, I can read all the merged roles/permissions?  Obviously
> there are methods to test roles/permissions, but i was looking for an api
> that would just return these items.
>
> Thanks,
>
> Rich
> --
> View this message in context: http://n2.nabble.com/Reading-Permissions-given-a-Subject-tp4677787p4677787.html
> Sent from the Shiro User mailing list archive at Nabble.com.
>

Mime
View raw message