You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shiro.apache.org by "Les Hazlewood (JIRA)" <ji...@apache.org> on 2009/04/27 21:45:30 UTC

[jira] Created: (KI-77) Refactor Realm implementations to favor delegation over inheritance

Refactor Realm implementations to favor delegation over inheritance
-------------------------------------------------------------------

                 Key: KI-77
                 URL: https://issues.apache.org/jira/browse/KI-77
             Project: Ki
          Issue Type: Improvement
          Components: Realms
    Affects Versions: 1.0
            Reporter: Les Hazlewood
             Fix For: 1.0


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.