digitalfabrik / entitlementcard

App for 'Digitale Berechtigungskarten', generally benefit card for volunteers or socially vulnerable groups in Germany. App for Android & iOS + Backend + Administration Web Portal – 100% Open Source.
MIT License
36 stars 3 forks source link

Add RBAC #1626

Open ztefanie opened 2 months ago

ztefanie commented 2 months ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] As a developer it is annoying to add new functionality that needs some form of validation if a user is allowed to do something.

Describe the solution you'd like Add RBAC (role based access control) Add to the data data model with the entities "Role" and "Permission"

Role: Defines the role of a user, e.g., Admin, region-admin, etc. Permission: Represents specific actions, such as is-allowed-to-create-regions, is-allowed-to-see-statistics, etc. Add a many-to-many relationship between "Roles" and "Permissions," as well as a many-to-one relationship between "Administrators" and "Role."

Adjust the current checks, so they check for permissions and not roles

Describe alternatives you've considered Leave everything as it is.

Testing Check if every user of different roles is still able to do what she/he is supposed to to and nothing else.