doorman icon indicating copy to clipboard operation
doorman copied to clipboard

Endpoint to return the list of allowed actions

Open leplatrem opened this issue 8 years ago • 1 comments

Useful to populate a UI for example.

  • [ ] Define formal representation of regexps (eg. actions: <.*>)
  • [ ] Design API endpoint and response

leplatrem avatar Oct 03 '17 14:10 leplatrem

Something as simple as that would do it:

POST /permissions
Authorization: bearer TOKEN

{
    "context": {
      "env": "stage"
    }
}
{
    "service1": {
        "resource1": ["read", "update"],
        "resource2": ["review", "signoff"],
    },
    "service2": {
        "path/<.*>": ["create"],
    }
}

Note: Posting context could be optional.

leplatrem avatar Dec 13 '17 19:12 leplatrem