Skip to content

capabilities check #2144

@mfulton26

Description

@mfulton26

It is often extremely helpful for presentation code to be able to query if the current user is able to perform a certain action so that the UI can show what operations are and are not available to them. Without this, presentation code must either duplicate permissions logic or allow things to fail when users attempt to do things and tell them they aren't authorized.

Can the ability to check what permissions are available on entities be added?

e.g. If the current user is allowed to view and create in a certain namespace but not update or delete then a "capabilities" object for that namespace could be something like { "view": true, "create": true, "update": false, "delete": false }. If such objects exist client-side for each namespace then presentation code (e.g. in React) can easily be rendered differently based on the user's permissions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions