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

Add desc to RequiresPermissions

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Won't Do
    • None
    • None
    • None
    • None

    Description

      This is a feature request.

      The use case is that I can parse RequiresPermissions to generate system permission list.

      However, I want to generate description text for each defined permission meanwhile.
      These texts will give better user experience rather than actual permissions.

      For example:

      
      @RequiresPermissions(value="admin:list", desc="Admin List Permission")
      
      @GetMapping("/list")
      public Object list(){
      
      }
      
      

      Afterwards, I can generate following json array and only show label property for users.

      [
        {
          id: "admin:list",
          label: "Admin List Permission"
        }
      ...
      ]
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            linlinjava Junling Bu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: