Skip to content
Snippets Groups Projects
Verified Commit 58ac0785 authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

fix: Program Managers **do** need edit__ permissions

parent 4a5c3ade
No related branches found
No related tags found
No related merge requests found
Pipeline #8438 passed
......@@ -4,13 +4,10 @@ from django.core.management.base import BaseCommand
from django.db.models import Q, QuerySet
PERMISSIONS = {
# Program Managers get all permissions, they don’t need the edit the permissions
# Program Managers get all permissions, they also need the edit the permissions
settings.PRIVILEGED_GROUP: {
"all": Permission.objects.filter(
~Q(codename__startswith="edit"),
content_type__app_label="program",
),
"user": Permission.objects.filter(codename="change_user"),
"all program": Permission.objects.filter(content_type__app_label="program"),
"change user": Permission.objects.filter(codename="change_user"),
},
# Host
settings.ENTITLED_GROUPS[0]: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment