Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
I had to apply this for Shubham's patch to allow non-administrator
access.
api/rest.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/api/rest.py b/api/rest.py
index bb56b4b..3e0cbc3 100644
--- a/api/rest.py
+++ b/api/rest.py
@@ -41,6 +41,8 @@ class IsMaintainerOrReadOnly(permissions.BasePermission):
Allows access only to admin users or maintainers.
"""
def has_object_permission(self, request, view, obj):
+ if isinstance(obj, Message):
+ obj = obj.project
return request.method in permissions.SAFE_METHODS or \
obj.maintained_by(request.user)
--
2.16.2
_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://www.redhat.com/mailman/listinfo/patchew-devel