Disallow creating review requests against other users' changesets
Review Request #35 — Created May 28, 2007 and submitted — Latest diff uploaded
At the moment, it's possible to create a review request against any changeset (with the perforce backend). If one person creates a review against another person's changeset number, that will then prevent the owning user from creating a request. Since perforce changelists include usernames, it's not hard to parse this out before we create anything in the database and check it against the logged-in user. Part of this change also fixes a bug in the "New Review Request" form where the selected repository was not being marked as such if there was an error.
Tried creating a review request against public.perforce.com with a random change number and my local user ("david"). Got expected error message.
Diff Revision 2
This is not the most recent revision of the diff. The latest diff is revision 3. See what's changed.
orig
1
2
3
trunk/reviewboard/diffviewer/forms.py |
---|
trunk/reviewboard/reviews/forms.py |
---|
trunk/reviewboard/reviews/views.py |
---|
trunk/reviewboard/scmtools/core.py |
---|
trunk/reviewboard/scmtools/perforce.py |
---|
trunk/reviewboard/templates/reviews/new_review_request.html |
---|