Commit a4a9ee57 authored by Michal Čihař's avatar Michal Čihař

Do not add user if object has no ACLs

Fixes rb#500
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 744bad2d
......@@ -72,7 +72,8 @@ def revoke_owner(request, project):
messages.error(request, _('You can not remove last owner!'))
else:
# Ensure owner stays within project
obj.add_user(form.cleaned_data['user'])
if obj.enable_acl:
obj.add_user(form.cleaned_data['user'])
obj.owners.remove(form.cleaned_data['user'])
......
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 to comment