Add new API endpoints for managing repository ACLs.

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

david
Review Board
release-4.0.x
reviewboard

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
Add new API endpoints for managing repository ACLs.
Description From Last Updated

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

reviewbotreviewbot

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

reviewbotreviewbot

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

reviewbotreviewbot

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

reviewbotreviewbot

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

reviewbotreviewbot

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

reviewbotreviewbot

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

reviewbotreviewbot

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

reviewbotreviewbot

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

reviewbotreviewbot

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

chipx86chipx86

These should be swapped.

chipx86chipx86

Missing , optional.

chipx86chipx86

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

chipx86chipx86

Missing , unused

maubinmaubin

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

maubinmaubin

We could just pass local_site_name as a keyword argument.

chipx86chipx86

These should be swapped.

chipx86chipx86

Missing , optional.

chipx86chipx86

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

chipx86chipx86

Missing , unused.

maubinmaubin

The function can take local_site_name=None.

chipx86chipx86

Add a Version Added:

maubinmaubin

Add a Version Added:

maubinmaubin

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

maubinmaubin

Missing a period at the end.

maubinmaubin

Add a Version Added:

maubinmaubin

Add a Version Added:

maubinmaubin

Missing a period at the end.

maubinmaubin

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

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

flake8

david
chipx86
  1. 
      
  2. This will have to be 4.0.11 now. Sorry :/

    Same in other places.

  3. These should be swapped.

  4. Missing , optional.

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

  6. We could just pass local_site_name as a keyword argument.

  7. These should be swapped.

  8. Missing , optional.

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

  10. The function can take local_site_name=None.

  11. 
      
maubin
  1. 
      
  2. Missing , unused

  3. 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. Missing , unused.

  5. Add a Version Added:

  6. Add a Version Added:

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

  8. Missing a period at the end.

  9. Add a Version Added:

  10. Add a Version Added:

  11. Missing a period at the end.

  12. 
      
david
Review request changed

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: Closed (submitted)

Change Summary:

Pushed to release-4.0.x (fb4e2d1)
Loading...