1. BeProud
  2. Untitled project
  3. django-hgwebproxy

Commits

Ian Lewis  committed b042a2d

Updated has_view_permission() to look at the is_private flag

  • Participants
  • Parent commits 9fb39d2
  • Branches default

Comments (0)

Files changed (1)

File hgwebproxy/models.py

View file
  • Ignore whitespace
         if user.is_superuser:
             return self.all()
         return self.distinct().filter(
+            Q(is_private = False) |
             Q(owner = user) | 
             Q(readers = user) |
             Q(writers = user) |
 
     def has_view_permission(self, user):
         return (
+            not self.is_private or
             self._is_reader(user) or
             self._is_writer(user) or
             self._is_admin(user)