• 
      

    [WIP] Update accessibility for private review requests

    Review Request #7705 — Created Oct. 16, 2015 and discarded

    Information

    Review Board
    master

    Reviewers

    [WIP] Update accessibility for private review requests

    
     
    Description From Last Updated

    This is missing a "Returns" section. It should be like: """ ... Returns: bool: <description of the return type> """

    chipx86chipx86

    Typo: "reviewers" should be "reviewer's".

    AD adriano

    You don't really need this condition. If groups is empty, then Python will automatically avoid entering the body of the …

    AD adriano

    undefined name 'silent'

    reviewbotreviewbot

    Col: 9 E303 too many blank lines (2)

    reviewbotreviewbot

    We usually surround our strings with single-quotes instead of double-quotes.

    AD adriano

    The return is a conclusion. A new paragraph. It should have a blank line before it.

    chipx86chipx86

    Make this into a @property.

    brenniebrennie

    Consider replacing this with: return not self.is_private()

    AD adriano

    <li> is not allowed in a <span>. It needs to be the other way around.

    chipx86chipx86
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          reviewboard/reviews/models/review_request.py
      
      Ignored Files:
          reviewboard/templates/reviews/review_detail.html
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/reviews/models/review_request.py
      
      Ignored Files:
          reviewboard/templates/reviews/review_detail.html
      
      
    2. Show all issues
       undefined name 'silent'
      
    3. Show all issues
      Col: 9
       E303 too many blank lines (2)
      
    4. 
        
    SH
    AD
    1. 
        
    2. Show all issues

      Typo: "reviewers" should be "reviewer's".

    3. Show all issues

      You don't really need this condition. If groups is empty, then Python will automatically avoid entering the body of the for loop.

    4. Show all issues

      We usually surround our strings with single-quotes instead of double-quotes.

    5. Single-quotes, not double-quotes.

    6. reviewboard/reviews/models/review_request.py (Diff revision 1)
       
       
       
       
       
       
      Show all issues

      Consider replacing this with:

      return not self.is_private()
      
    7. 
        
    brennie
    1. 
        
    2. reviewboard/reviews/models/review_request.py (Diff revision 1)
       
       
       
       
      Show all issues

      Make this into a @property.

    3. 
        
    chipx86
    1. 
        
    2. reviewboard/reviews/models/review_request.py (Diff revision 1)
       
       
       
       
       
       
       
       
       
       
       
      Show all issues

      This is missing a "Returns" section. It should be like:

      """
      
      ...
      
      Returns:
          bool:
          <description of the return type>
      """
      
    3. Show all issues

      The return is a conclusion. A new paragraph. It should have a blank line before it.

    4. Show all issues

      <li> is not allowed in a <span>. It needs to be the other way around.

    5. 
        
    chipx86
    1. The design for this is going to need to change. It's not enough to stick the private flag in extra_data, because we can't query on it, and it's crucial that we can query on it, since otherwise private review requests will show up in the dashboard, All Review Requests page, search, etc.

      You'll need to make a new private field on the model.

      You'll also need to update the _query function in reviewboard/reviews/managers.py (see the if filter_private section) to consider this field.

      1. The way I am implementing it currently was recommended to me by Barrett. I believe he said that adding a new field to the model was an expensive operation(?).

        If I change the is_accessible_by() inside of review_request.py to depend on the extra_data private flag, won't that be enough to hide the review request when necessary? Or is is_accessible_by() not called during queries?

      2. It's true that adding new fields is expensive, but in this case, we need it, because we'll want to be able to include it in queries for the dashboard.

    2. 
        
    SH
    Review request changed
    Status:
    Discarded
    Change Summary:

    Discarded in favor of https://reviews.reviewboard.org/r/7727/