unit tests, add cisa_analyst permission in the cisa_analysts_group for better grannular hasPerm testing in admin.py

This commit is contained in:
Rachid Mrad 2023-09-29 13:40:06 -04:00
parent cd14eb2584
commit 155baa0200
No known key found for this signature in database
GPG key ID: EF38E4CEC4A8F3CF
11 changed files with 142 additions and 64 deletions

View file

@ -9,13 +9,8 @@ our `user_group` model and run in a migration.
## Editing group permissions through code
We can edit and deploy new group permissions by
editing `user_group` then:
We can edit and deploy new group permissions by:
- Duplicating migration `0036_create_groups`
and running migrations (RECOMMENDED METHOD), or
- Fake the previous migration to run an existing create groups migration:
- step 1: docker-compose exec app ./manage.py migrate --fake registrar 0035_contenttypes_permissions
- step 2: docker-compose exec app ./manage.py migrate registrar 0036_create_groups
- step 3: fake run the latest migration in the migrations list
1. editing `user_group` then:
2. Duplicating migration `0036_create_groups`
and running migrations