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

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. 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

Diff:

Revision 3 (+2986)

Show changes

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...