Commit 2a0753b9 authored by Michal Čihař's avatar Michal Čihař

Automatically add permission to owners

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent e602d062
......@@ -171,7 +171,10 @@ class Project(models.Model, PercentMixin, URLMixin, PathMixin):
if user is None:
return False
return user.has_perm('trans.weblate_acl_%s' % self.slug)
if user.has_perm('trans.weblate_acl_%s' % self.slug):
return True
return self.owners.filter(id=user.id).exists()
def check_acl(self, request):
"""
......
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