[
https://issues.apache.org/jira/browse/SHIRO-59?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kalle Korhonen resolved SHIRO-59.
---------------------------------
Resolution: Fixed
Fix Version/s: 1.0.0
Patch applied. Thanks Brian - you should have highlighted that the patch
includes tests, I would have taken a look at it earlier. I love these kind of
patches, high quality and very complete, your effort is much appreciated! Agree
on the PermissionResolver comment - don't necessarily like adding a specific
interface for roles but adding another operation to the existing one doesn't
sound any better. Closing this issue, we can revisit the interface in a future
version if we come up with a consolidated solution.
> Refactor Realm implementations to favor delegation over inheritance
> -------------------------------------------------------------------
>
> Key: SHIRO-59
> URL: https://issues.apache.org/jira/browse/SHIRO-59
> Project: Shiro
> Issue Type: Improvement
> Reporter: Les Hazlewood
> Assignee: Kalle Korhonen
> Fix For: 1.0.0
>
> Attachments: SHIRO-59.diff
>
>
> Currently most people need to subclass Realm implementations to perform role
> and/or permission checks. This is not very scalable when more than a few
> realms exist, or people need to re-use realms across applications.
> Instead, it would be much nicer to allow developers to configure components
> that did most of the common Realm logic, regardless of data store. For
> example, perhaps a RolePermissionResolver could be introduced:
> rolePermissionResolver.getPermissions( String roleName );
> This could be injected across multiple realms across applications instead of
> needing to subclass Realm implementations - a little nicer approach. Also,
> we might want to look at uses of the Strategy design pattern for checking
> logic.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.