• 
      

    Add new API endpoints for managing repository ACLs.

    Review Request #12489 — Created July 27, 2022 and submitted

    Information

    Review Board
    release-4.0.x

    Reviewers

    One thing we've had requests for over the years is a way to manage
    repository ACLs via scripts or other automation. This change adds two
    new API endpoints for these. These are both children of the repository
    resource, and work similarly to the existing group member resource.

    • Ran unit tests.
    • Made a variety of API requests to manage repository ACLs.
    Summary ID
    Add new API endpoints for managing repository ACLs.
    One thing we've had requests for over the years is a way to manage repository ACLs via scripts or other automation. This change adds two new API endpoints for these. These are both children of the repository resource, and work similarly to the existing group member resource. Testing Done: - Ran unit tests. - Made a variety of API requests to manage repository ACLs.
    6fbe71286e709ee3851b6667d227d79d0ce859ad
    Description From Last Updated

    'djblets.util.decorators.augment_method_from' imported but unused Column: 1 Error code: F401

    reviewbot reviewbot

    'reviewboard.scmtools.models.Repository' imported but unused Column: 1 Error code: F401

    reviewbot reviewbot

    local variable 'local_site' is assigned to but never used Column: 9 Error code: F841

    reviewbot reviewbot

    'reviewboard.scmtools.models.Repository' imported but unused Column: 1 Error code: F401

    reviewbot reviewbot

    local variable 'local_site' is assigned to but never used Column: 9 Error code: F841

    reviewbot reviewbot

    too many blank lines (3) Column: 1 Error code: E303

    reviewbot reviewbot

    local variable 'user' is assigned to but never used Column: 9 Error code: F841

    reviewbot reviewbot

    expected 2 blank lines, found 1 Column: 1 Error code: E302

    reviewbot reviewbot

    line too long (80 > 79 characters) Column: 80 Error code: E501

    reviewbot reviewbot

    This will have to be 4.0.11 now. Sorry :/ Same in other places.

    chipx86 chipx86

    These should be swapped.

    chipx86 chipx86

    Missing , optional.

    chipx86 chipx86

    For future-proofing, let's pass in request as a keyword argument.

    chipx86 chipx86

    Missing , unused

    maubin maubin

    Why not use repository.is_accessible_by here? Same with the other has_access_permissions and has_list_access_permissions methods.

    maubin maubin

    We could just pass local_site_name as a keyword argument.

    chipx86 chipx86

    These should be swapped.

    chipx86 chipx86

    Missing , optional.

    chipx86 chipx86

    Same as above, let's do request=request.

    chipx86 chipx86

    Missing , unused.

    maubin maubin

    The function can take local_site_name=None.

    chipx86 chipx86

    Add a Version Added:

    maubin maubin

    Add a Version Added:

    maubin maubin

    Missing , unused? Same for the other setup_ and check_ methods.

    maubin maubin

    Missing a period at the end.

    maubin maubin

    Add a Version Added:

    maubin maubin

    Add a Version Added:

    maubin maubin

    Missing a period at the end.

    maubin maubin

    line too long (81 > 79 characters) Column: 80 Error code: E501

    reviewbot reviewbot
    Checks run (1 failed, 1 succeeded)
    flake8 failed.
    JSHint passed.

    flake8

    david
    chipx86
    1. 
        
    2. Show all issues

      This will have to be 4.0.11 now. Sorry :/

      Same in other places.

    3. Show all issues

      These should be swapped.

    4. Show all issues

      Missing , optional.

    5. Show all issues

      For future-proofing, let's pass in request as a keyword argument.

    6. Show all issues

      We could just pass local_site_name as a keyword argument.

    7. Show all issues

      These should be swapped.

    8. Show all issues

      Missing , optional.

    9. Show all issues

      Same as above, let's do request=request.

    10. Show all issues

      The function can take local_site_name=None.

    11. 
        
    maubin
    1. 
        
    2. Show all issues

      Missing , unused

    3. Show all issues

      Why not use repository.is_accessible_by here? Same with the other has_access_permissions and has_list_access_permissions methods.

      1. This is an admin-only resource, so we really only want it accessible if it's also mutable.

    4. Show all issues

      Missing , unused.

    5. Show all issues

      Add a Version Added:

    6. Show all issues

      Add a Version Added:

    7. Show all issues

      Missing , unused? Same for the other setup_ and check_ methods.

    8. Show all issues

      Missing a period at the end.

    9. Show all issues

      Add a Version Added:

    10. Show all issues

      Add a Version Added:

    11. Show all issues

      Missing a period at the end.

    12. 
        
    david
    Review request changed
    Commits:
    Summary ID
    Add new API endpoints for managing repository ACLs.
    One thing we've had requests for over the years is a way to manage repository ACLs via scripts or other automation. This change adds two new API endpoints for these. These are both children of the repository resource, and work similarly to the existing group member resource. Testing Done: - Ran unit tests. - Made a variety of API requests to manage repository ACLs.
    40afbdd711a8eb5b7aaec8117c63f87152cbacb9
    Add new API endpoints for managing repository ACLs.
    One thing we've had requests for over the years is a way to manage repository ACLs via scripts or other automation. This change adds two new API endpoints for these. These are both children of the repository resource, and work similarly to the existing group member resource. Testing Done: - Ran unit tests. - Made a variety of API requests to manage repository ACLs.
    2089ec16a34ad2a58294339173428e554269c36e

    Checks run (1 failed, 1 succeeded)

    flake8 failed.
    JSHint passed.

    flake8

    david
    maubin
    1. Ship It!
    2. 
        
    david
    david
    chipx86
    1. Ship It!
    2. 
        
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-4.0.x (fb4e2d1)