fix custom field view perms fixes #1941

This commit is contained in:
wh1te909
2024-07-30 09:03:45 +00:00
parent 781282599c
commit 282087d0f3

View File

@@ -36,6 +36,8 @@ class CustomFieldPerms(permissions.BasePermission):
def has_permission(self, r, view) -> bool:
if r.method == "GET":
return _has_perm(r, "can_view_customfields")
elif r.method == "PATCH" and view.__class__.__name__ == "GetAddCustomFields":
return _has_perm(r, "can_view_customfields")
return _has_perm(r, "can_manage_customfields")