How to add a new permission (in a meeting) - OpenSlides/OpenSlides GitHub Wiki
- See the permission.yml
- Add a new permission by writing the permission into the permission tree (in the
permission.yml
). Lower permissions (permissions with indent) are inherited by the higher permissions. - Add the new permission to the
group
collection in the models.yml - Then, generate a new
permissions.py
and a newmodels.py
by calling a. (in openslides-backend)make run-dev
a.make generate-permissions
a.make generate-models
a. The permission is now available and can be used.
For the client side, there is a command-line interface (CLI), too. To use this, call npx ts-node ./client/cli/generate-permissions.ts
.
This generates an updated permission-children.ts
. To update the permission matrix for the
GroupListComponent
, go to "./client/src/app/core/core-services/permission.ts" and apply your
changes to the enum Permission
and the const PERMISSIONS
(the last one is used by the
GroupListComponent
to display the several permissions).