Commit 59534d71 by Őry Máté

acl: owner can set any level

parent 585e44b7
...@@ -83,7 +83,8 @@ class AclUpdateView(View, SingleObjectMixin): ...@@ -83,7 +83,8 @@ class AclUpdateView(View, SingleObjectMixin):
def post(self, request, *args, **kwargs): def post(self, request, *args, **kwargs):
instance = self.get_object() instance = self.get_object()
if not instance.has_level(request.user, "owner"): if not (instance.has_level(request.user, "owner") or
getattr(instance, 'owner', None) == request.user):
logger.warning('Tried to set permissions of %s by non-owner %s.', logger.warning('Tried to set permissions of %s by non-owner %s.',
unicode(instance), unicode(request.user)) unicode(instance), unicode(request.user))
raise PermissionDenied() raise PermissionDenied()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment