Shiro
  1. Shiro
  2. SHIRO-175

Improve Set of permission and role checks

    Details

      Description

      Both the shiro tag library and tapestry-security have seen fit to extend the permissions and role checks. It would be nice to have a complete set of annotations and permissions checks as follows:

      Right now, Shiro supports:

      @RequiresRoles(String)

      @RequiresPermissions(String)

      These have the additionally issue that multiple values are separated by commas, which conflicts with commas in the permission strings.

      I would like to suggest the following more complete, and specific set:

      @RequiresAllRoles(String[] ) <-- same as current RequiresRoles, except the AND is specified, and the roles can be done via:

      @RequiresAllRoles(

      {"role1", "role2"}

      )

      @RequiresAnyRoles(String[] ) <--- the OR version, runs if any role is implied.

      @RequiresAllPermissions(String[] )
      @RequiresAnyPermissions(String[] )

      SecurityCheck(allRoles, anyRoles, allPermissions, anyPermissions) <--- all in one with one annotation

        Activity

        Pierce Wetter created issue -
        Kalle Korhonen made changes -
        Field Original Value New Value
        Assignee Kalle Korhonen [ kaosko ]
        Kalle Korhonen made changes -
        Fix Version/s 1.1.0 [ 12314742 ]
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Les Hazlewood made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Kalle Korhonen
            Reporter:
            Pierce Wetter
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development