3118: admin user can't view Review Requests associated with non-public repositories

markd*****@gmai***** (Google Code) (Is this you? Claim this profile.)
Jan. 18, 2014
What version are you running?
1.7.16


What's the URL of the page containing the problem?
N/A


What steps will reproduce the problem?
1. Set up a non-public repository (SVN, Perforce, whatever)
2. Try to view the review as a user other than the creator

What is the expected output? What do you see instead?
I expect to see the review.Instead I get an RB message about permissions.


What operating system are you using? What browser?
CentOS 6, Firefox on MacOS v 24.0


Please provide any additional information below.
#1 markd*****@gmai***** (Google Code) (Is this you? Claim this profile.)
The attached patch suggested by Christian seems to fix the problem for 1.7.16
  • +
    --- ../../../orig/ReviewBoard-1.7.16/reviewboard/scmtools/models.py	2013-10-11 15:27:38.000000000 -0700
    +++ ./models.py	2013-10-18 15:04:02.669261000 -0700
    @@ -199,15 +199,17 @@
     
             The repository is accessibly by the user if it is public or
             the user has access to it (either by being explicitly on the allowed
    -        users list, or by being a member of a review group on that list).
    +        users list, or by being a member of a review group on that list),
    +        or if user is superuser.
             """
             if self.local_site and not self.local_site.is_accessible_by(user):
                 return False
     
             return (self.public or
    -                (user.is_authenticated() and
    -                 (self.review_groups.filter(users__pk=user.pk).count() > 0 or
    -                  self.users.filter(pk=user.pk).count() > 0)))
    +                user.is_superuser or
    +                 (user.is_authenticated() and
    +                  (self.review_groups.filter(users__pk=user.pk).c
david
#2 david
Fixed in release-1.7.x (ded47ac). This will ship in 1.7.22.
  • +Fixed