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

fix: refer to permissions with program prefix

parent 74376313
No related branches found
No related tags found
No related merge requests found
Pipeline #7792 passed
......@@ -635,7 +635,7 @@ class ShowSerializer(serializers.HyperlinkedModelSerializer):
raise exceptions.PermissionDenied(detail="You are not allowed to update this show.")
# without the update_show permission, fields without edit permission are not allowed
if not user.has_perm("update_show") and (
if not user.has_perm("program.update_show") and (
not_allowed := update_fields.difference(user_permissions)
):
detail = {field: "You are not allowed to edit this field" for field in not_allowed}
......
......@@ -724,7 +724,7 @@ class APINoteViewSet(
user = self.request.user
if self.request.method in permissions.SAFE_METHODS or user.has_perm("update_note"):
if self.request.method in permissions.SAFE_METHODS or user.has_perm("program.update_note"):
return Note.objects.all()
else:
return Note.objects.filter(timeslot__schedule__show__owners=user)
......
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