You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by mickepicke <mi...@maxm.se> on 2015/05/13 15:28:54 UTC

Re: Subject.isPermitted(List permissions) hitting the cache for every permission.

Hi,

Sorry for waking this old thread!

> It depends on the realm implementation

I don't think it's entirely true that this is up to the Realm
implementations. 

org.apache.shiro.authz.ModularRealmAuthorizer has several "isPermitted"
methods that accept collections of permissions to check. But all of them
have loops that call into the non-batch counterparts in the realms – so the
realms never get a chance to do any sort of batch processing. I believe that
the correct behavior would be to for ModularRealmAuthorizer to call one of
the batch methods on each of the realms and merge the resulting boolean
arrays. This can be achieved by subclassing ModularRealmAuthorizer (which
I've done), but I believe that it's a bug that should be fixed.





--
View this message in context: http://shiro-user.582556.n2.nabble.com/Subject-isPermitted-List-Permission-permissions-hitting-the-cache-for-every-permission-tp7580357p7580541.html
Sent from the Shiro User mailing list archive at Nabble.com.