Commit 870f6b2c authored by Michal Čihař's avatar Michal Čihař

Check ACL for non authenticated user as well

This allows to give anonymous user read only access.

Issue #758
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 35b0fb64
...@@ -169,7 +169,7 @@ class Project(models.Model, PercentMixin, URLMixin, PathMixin): ...@@ -169,7 +169,7 @@ class Project(models.Model, PercentMixin, URLMixin, PathMixin):
if not self.enable_acl: if not self.enable_acl:
return True return True
if user is None or not user.is_authenticated(): if user is None:
return False return False
return user.has_perm('trans.weblate_acl_%s' % self.slug) return user.has_perm('trans.weblate_acl_%s' % self.slug)
......
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