Issue 2766: Web api 'review-requests' not returning draft review requests
Review Request #6328 — Created Sept. 16, 2014 and submitted — Latest diff uploaded
Added check for whether the user is admin in webapi/review_request.py. If so, the _query function for ReviewRequestManager (reviews/managers.py) will query for both public and NON public (draft) review requests, as opposed to just querying for public ones.
- Verified that admin accounts see draft reviews through /api/review-requests/?status=all, but normal accounts do not.
- This change only affects the webapi, and not any other module that might use the ReviewRequestManager. Verifiedthat the "All Review Requests" page is unaffected here.
- webapi and reviewboard module unit tests run and passed
- Added unit tests for private review request visibility in the reviewboard and the webapi unit tests