• 
      

    Add documentation for User Roles.

    Review Request #15068 — Created May 20, 2026 and submitted

    Information

    Review Board
    release-8.x

    Reviewers

    This adds documentation for User Roles. While this is a Power Pack feature,
    moving forward we'll be consolidating Power Pack documentation into the
    Review Board docs base. This follows our plans of unifying things under
    just one "product" and will make things easier to find for users.

    Along with the user roles documentation, this adds a "Useful Data and
    Resources" section to the review request approval hook docs that lists
    some attributes and resources that are useful for approval hooks. I added
    this because I thought it'd be a good place to plug user roles.

    We also now allow references to the Power Pack docs.

    • Built the docs and viewed them.
    • Was able to click on the UserRole.objects.for_user() reference
      and get redirected to the Power Pack coderef entry for it.
    Summary ID
    Add documentation for User Roles.
    This adds documentation for User Roles. While this is a Power Pack feature, moving forward we'll be consolidating Power Pack documentation into the Review Board docs base. This follows our plans of unifying things under just one "product" and will make things easier to find for users. Along with the user roles documentation, this adds a "Useful Data and Resources" section to the review request approval hook docs that lists some attributes and resources that are useful for approval hooks. This is a good place to plug user roles.
    18041b17001412427bf7c34dfea9050222666d16
    Description From Last Updated

    We have some odd rendering for definition lists, like these. We need to fix those up, but I started to …

    chipx86 chipx86

    We have a "slug" :term: we can use to reference this, which will show what characters are allowed. Might also …

    chipx86 chipx86

    Maybe instead of "Only licensed Power Pack users," we should say "Only users assigned to your license for Review Board …

    chipx86 chipx86

    I love this example. I wonder if instead of having the code here, we should put this in the hook …

    chipx86 chipx86

    Just for correctness, this should probably be UserRole.objects.get(slug='team-lead', local_site=review_request.local_site)

    david david

    This should be UserRole.objects.for_user. We probably should also mention passing in request here (to get the local site when present)

    david david

    These headings should probably be promoted one level (i.e. "Useful Data and Resources" should be a sibling of "Common Patterns")

    david david

    Two blank lines here.

    chipx86 chipx86

    Can we make these bullet points as well? Also, each of these can be a :py:attr: or similar.

    chipx86 chipx86

    Here too.

    david david

    Let's give this an explicit title, in case the title ever changes.

    chipx86 chipx86

    "Two" here seems like it might get out of date without us noticing. Can we say "The following conditions are …

    david david

    There's an extra space in here that I think is actually likely to break the reference entirely.

    david david

    These won't link properly. We should use: * :py:attr:`~reviewboard.reviews.models.ReviewRequest.submitter`

    david david

    Extra blank line here.

    david david

    Based on feedback from David, I removed the period in mine. Trivial change.

    chipx86 chipx86
    david
    1. 
        
    2. Show all issues

      Just for correctness, this should probably be UserRole.objects.get(slug='team-lead', local_site=review_request.local_site)

    3. Show all issues

      This should be UserRole.objects.for_user.

      We probably should also mention passing in request here (to get the local site when present)

      1. I'll link to the coderef docs that I'm adding in Power Pack for this, so I don't have to manually repeat the arguments.

    4. Show all issues

      These headings should probably be promoted one level (i.e. "Useful Data and Resources" should be a sibling of "Common Patterns")

    5. Show all issues

      Here too.

    6. 
        
    maubin
    chipx86
    1. 
        
    2. docs/manual/admin/configuration/user-roles.rst (Diff revision 1)
       
       
       
       
       
       
       
       
       
       
       
       
       
       
      Show all issues

      We have some odd rendering for definition lists, like these. We need to fix those up, but I started to rethink lists like these, and have been moving to bullet points like:

      * :guilabel:`...`
      
        description...
      

      This has ended up looking a bit better all around, I think. Clearly indicates these are entries in a list, and aligns the names with the descriptions. See what you think.

    3. Show all issues

      We have a "slug" :term: we can use to reference this, which will show what characters are allowed.

      Might also be worth just duplicating those characters here as well.

    4. Show all issues

      Maybe instead of "Only licensed Power Pack users," we should say "Only users assigned to your license for Review Board or Power Pack ..."

      We really still need some central docs in RB for the licensing that we can link to... Not going to make it for Tuesday.

      1. Users can really only be "assigned" to the Power Pack license. But when we say "assign users to your Review Board license" this really just means assigning them to the accompanying Power Pack license. So instead of saying "Only users assigned to your license for Review Board or Power Pack ..." how about just "Only users assigned to your license ...".

    5. Show all issues

      I love this example. I wonder if instead of having the code here, we should put this in the hook docs for this and reference it. Admins should be made aware of this ability but probably aren't going to understand the code off-hand.

      Ieally we'd have a full-on guide for approval hooks with different examples, but that's a larger task, and this would be more than suitable as a section under the hood.

    6. Show all issues

      Two blank lines here.

    7. Show all issues

      Can we make these bullet points as well?

      Also, each of these can be a :py:attr: or similar.

    8. Show all issues

      Let's give this an explicit title, in case the title ever changes.

    9. 
        
    maubin
    maubin
    david
    1. 
        
    2. Show all issues

      "Two" here seems like it might get out of date without us noticing. Can we say "The following conditions are available"?

    3. Show all issues

      These won't link properly. We should use:

      * :py:attr:`~reviewboard.reviews.models.ReviewRequest.submitter`
      
    4. Show all issues

      Extra blank line here.

    5. 
        
    david
    1. 
        
    2. Show all issues

      There's an extra space in here that I think is actually likely to break the reference entirely.

    3. 
        
    maubin
    david
    1. Ship It!
    2. 
        
    chipx86
    1. 
        
    2. Show all issues

      Based on feedback from David, I removed the period in mine. Trivial change.

    3. 
        
    maubin
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-8.x (e692910)