How to add a new permission (in a meeting) - OpenSlides/OpenSlides GitHub Wiki

Backend

  1. See the permission.yml
  2. 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.
  3. Add the new permission to the group collection in the models.yml
  4. Then, generate a new permissions.py and a new models.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.

Client

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).

⚠️ **GitHub.com Fallback** ⚠️