Skip to content

Commit

Permalink
Correct global perm
Browse files Browse the repository at this point in the history
  • Loading branch information
ericholscher committed Oct 6, 2015
1 parent 6126409 commit befd236
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions readthedocs/privacy/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class VersionManager(models.Manager):
"""

def _add_user_repos(self, queryset, user):
if user.has_perm('projects.view_project'):
if user.has_perm('builds.view_version'):
return self.get_queryset().all().distinct()
if user.is_authenticated():
user_queryset = get_objects_for_user(user, 'builds.view_version')
Expand Down Expand Up @@ -123,7 +123,7 @@ class BuildManager(models.Manager):
"""

def _add_user_repos(self, queryset, user=None):
if user.has_perm('projects.view_project'):
if user.has_perm('builds.view_version'):
return self.get_queryset().all().distinct()
if user.is_authenticated():
user_queryset = get_objects_for_user(user, 'builds.view_version')
Expand Down

0 comments on commit befd236

Please sign in to comment.