Enable locking of a scenario as admin user
Admin users should be able to lock a scenario for all other users (except for other admins)
@skolen has modified the backend data model of the scenario already (backend repo branch
scenario-is-locked) so that the unused parameter
running is transformed into a parameter
isLocked. Only admin users can change this parameter. If a normal user tries to change it, the change will simply be ignored (no error returned). A locked scenario and all of its associated components (configs, files, dashboards, results) cannot be modified by normal users (=
DELETE do not work and return 422 error). Reading (=
GET) requests are possible. Admin users can change locked scenarios.
Please use the changes in the backend only locally for now. The k8s Postgres database requires a manual adaption to the new data model before the changes can work for existing scenarios.
In the frontend, we need to adapt the scenario table and the scenario page to consider the
- Buttons to edit or duplicate or import any scenario or one of its components should not be shown for a locked scenario
- We need to introduce a possibility to lock/ unlock a scenario (only showing if user is admin) to the scenario table and the scenario page