Shiro
  1. Shiro
  2. SHIRO-59

Refactor Realm implementations to favor delegation over inheritance

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.0
    • Component/s: None
    • Labels:
      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.

      1. SHIRO-59.diff
        17 kB
        Brian Demers

        Issue Links

          Activity

          Les Hazlewood created issue -
          Niclas Hedhman made changes -
          Field Original Value New Value
          Project Ki [ 12310890 ] Shiro [ 12310950 ]
          Key KI-77 SHIRO-59
          Affects Version/s 1.0 [ 12313690 ]
          Component/s Realms [ 12312681 ]
          Fix Version/s 1.0 [ 12313690 ]
          Brian Demers made changes -
          Attachment SHIRO-59.diff [ 12431572 ]
          Kalle Korhonen made changes -
          Assignee Kalle Korhonen [ kaosko ]
          Kalle Korhonen made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 1.0.0 [ 12314078 ]
          Resolution Fixed [ 1 ]
          Brian Demers made changes -
          Link This issue is blocked by SHIRO-163 [ SHIRO-163 ]
          Brian Demers made changes -
          Link This issue is blocked by SHIRO-163 [ SHIRO-163 ]
          Brian Demers made changes -
          Link This issue is related to SHIRO-163 [ SHIRO-163 ]
          Les Hazlewood made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Kalle Korhonen
              Reporter:
              Les Hazlewood
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development