Uploaded image for project: 'Shiro'
  1. Shiro
  2. SHIRO-59

Refactor Realm implementations to favor delegation over inheritance

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0.0
    • None
    • None

    Description

      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.

      Attachments

        1. SHIRO-59.diff
          17 kB
          Brian Demers

        Issue Links

          Activity

            People

              kaosko Kalle Korhonen
              lhazlewood Les Hazlewood
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: