• 
      

    Only include unpublished review requests in the API when requested.

    Review Request #6360 — Created Sept. 23, 2014 and submitted

    Information

    Review Board
    release-2.0.x
    e1dbd91...

    Reviewers

    Recently, a change was added that resulted in /api/review-requests/
    returning all unpublished review requests for all users, when requested
    by an admin. This could impact existing scripts, and potentially make
    things harder for day-to-day work by users who happen to also be admins.

    Now, the caller must pass ?show-all-unpublished=1 to get this new
    behavior. That allows scripts to opt-in to this only when needed.

    The flag on ReviewRequestManager was also renamed to
    show_all_unpublished. If set, the resulting query is actually
    simplified and doesn't do any public= or submitter= checks. Previously,
    it resulted in a query like public = true OR submitter = <user> OR public = false,
    which was unnecessary.

    The renaming of the flag also helps clear up confusion about its
    relation to accessing private review requests (private by way of
    group/repository settings).

    All unit tests pass.

    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          reviewboard/webapi/tests/test_review_request.py
          reviewboard/reviews/tests.py
          reviewboard/webapi/resources/review_request.py
          reviewboard/reviews/managers.py
      
      
    2. 
        
    reviewbot
    1. Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/webapi/tests/test_review_request.py
          reviewboard/reviews/tests.py
          reviewboard/webapi/resources/review_request.py
          reviewboard/reviews/managers.py
      
      
    2. 
        
    david
    1. Ship It!

    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-2.0.x (ba3ed6c)