OS2iot / OS2iot-backend

This repository contains the backend to the project OS2iot.
Mozilla Public License 2.0
10 stars 7 forks source link

Revised user management and permissions #149

Closed AramAlsabti closed 2 years ago

AramAlsabti commented 2 years ago

This PR overhauls the permissions system to allow finer control of who has access to what. A detailed description of this can be found here (in Danish)

In general, this PR adds 3 new permissions which will replace 2 existing ones. The migration is as follows:

Splitting the previous Organization Admin into multiple admin permissions means that every component with admin permission checks now have to be more specific in accordance with the domain. I.e. you now have to be a User Admin to make changes in permissions, users and organizations.

NB This PR introduces a new migration both for updating the permissions and migrating old permissions. There's no 1-1 translation so duplicate permissions (user groups) will occur.

To accept this PR, the following things must be in order:

It has a related frontend and documentation PR.