# Feature OP-8172 - Backend: Add API endpoint for permissions

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-8172

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Target versions | 11.3.0 |
| Sprint | 11.3.0 |
| Backlog bucket |  |
| Votes |  |
| List |  |
| Roadmap |  |
| Relevance |  |

## OPEN POINTS / FEEDBACK

_No work packages_

## Features and Chunks

_No work packages_

## Bugs and other work packages

_No work packages_

## Technical Details

| Attribute | Value |
| --- | --- |
| Module |  |
| Feature Flag |  |
| Requires doc change | Yes |
| Enterprise plan |  |

## Details

| Attribute | Value |
| --- | --- |
| Pull preview |  |
| Mockups |  |
| Accessibility | No |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Feature Lead |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| PD (min) |  |
| PD (max) |  |
| Work |  |
| Labor costs |  |

## Description

### Use cases

*   Get all projects in which an action can be performed for a user
*   Get actions a user can perform inside a project (e.g. have a work package assigned - which is not really an action)
*   Get all users allowed a certain action (this is currently carried out by specific end points, e.g. available\_assignees)
*   Knowing why an action cannot be carried out without having to trigger the action first (e.g. moving a work package to a project within a subproject board -&gt; highlight eligible columns and disable the rest.)
*   ?Deduce the project menu -&gt; depending on the actions, menu items can be displayed or hidden?
*   Will adding a role to a user allow the action to assign work packages to the user. This should be answered before the role is assigned.
*   For every resource (e.g. work package, user) -&gt; what are the allowed actions?

### Considerations

*   Who is allowed to query for actions, e.g. all actions another user can perform
*   Performance: calculating the complete set for a larger amount of users/projects and rendering potentially long lists is work
*   How to deal with existing action links in already published resources. Currently we mix resource and action links which is confusing.
*   What is the correct granularity for the actions and how to have some standard (e.g. CRUD). For work packages, the actions are more granular compared to e.g. news.

### Notes

*   Rather a list of actions than a list of the permissions that exist in the backend. Reason: Even tough a permission might be set, there can be additional conditions not met that prevent an action to be active.
*   Idea: Instead of not displaying actions that are not available, render all the actions but flag them to be unavailable. Add a &quot;reason&quot; property to note why an action is unavailable. Reason: That way, the frontend can display the reason why an action is unavailable to the user.
