Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-45302

There’s no way to know available permissions beforehand

    Details

    • Type: Story
    • Status: Closed
    • Resolution: Won't Fix
    • Affects Version/s: 6.2.0 CE GA1, 6.2.10 EE GA1
    • Fix Version/s: None
    • Labels:
      None

      Description

      Currently there is no way to know if I have a permission on something.

      While it could be possible to expose a permission service to give us the correct information, the required syntax would be a little too much verbose IMHO. A specific syntax could do the job without cluttering the request payload.

      {
        "/blogsentry/get-group-entries": {
          "groupId": 12345,
          "status": 0,
          "max": -1,
          // This could be an idea
          "@can = permissions": [ "UPDATE", "DELETE" ]
          // Or something more succint
          "@permissions": [ "UPDATE", "DELETE" ]
        }
      }
      

      the result should/could be

      [
        {
          "entryId": 1234,
          "title": "...",
          // ...
          "permissions": {
            "UPDATE": true,
            "DELETE": false
          }
        },
        {
          "entryId": 1233,
          "title": "...",
          // ...
          "permissions": {
            "UPDATE": false,
            "DELETE": false
          }
        },
        // ...
      ]
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Packages

                  Version Package