Add instructions for user group migrations

This commit is contained in:
Erin 2024-04-03 15:18:50 -07:00
parent d0d312598d
commit c25a082aa0
No known key found for this signature in database
GPG key ID: 1CAD275313C62460

View file

@ -5,6 +5,16 @@ logger = logging.getLogger(__name__)
class UserGroup(Group): class UserGroup(Group):
"""
UserGroup sets read and write permissions for superusers (who have full access)
and analysts. To update analyst permissions do the following:
1. Make desired changes to analyst group permissions in user_group.py.
2. Follow the steps in 0037_create_groups_v01.py to create a duplicate
migration for the updated user group permissions.
3. To migrate locally, run docker-compose up. To migrate on a sandbox,
push the new migration onto your sandbox before migrating.
"""
class Meta: class Meta:
verbose_name = "User group" verbose_name = "User group"
verbose_name_plural = "User groups" verbose_name_plural = "User groups"
@ -49,7 +59,7 @@ class UserGroup(Group):
{ {
"app_label": "registrar", "app_label": "registrar",
"model": "user", "model": "user",
"permissions": ["analyst_access_permission", "change_user"], "permissions": ["analyst_access_permission", "change_user", "delete_user"],
}, },
{ {
"app_label": "registrar", "app_label": "registrar",