Repository navigation
Conversation
|
Thanks for the pull request, @rodmgwgu! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
| sorts them in Python, and then paginates. The list is bounded by the schema roles plus the custom | ||
| roles of the instance. User counts are computed with one grouped query, not one query per role. | ||
|
|
||
| 5. Validation |
There was a problem hiding this comment.
I think for security reasons none of these fields should be editable, not even the permissions, except maybe the description. Editing a role's permissions changes the access of every user who holds it right away, and nothing records who made the change or why. I explained this in more detail in ADR 0035. If roles stay immutable, PATCH would only accept description, and changing permissions would mean creating a new role.
BryanttV
left a comment
There was a problem hiding this comment.
LGTM! Thanks for this! Just one comment.
| * - Create | ||
| - ``POST /api/authz/v1/roles/`` | ||
| * - Read one role | ||
| - ``GET /api/authz/v1/roles/<role>/`` |
There was a problem hiding this comment.
<role>, refers to role_id, correct? For example: custom_course_manager?
There was a problem hiding this comment.
yes!, added clarification
Closes #469
Problem
The Administrative Console needs to create, list, edit, copy, and remove custom roles, and to move a role's members to another role. ADR 0035 decides how custom roles are stored, but no ADR defines who can manage them or the REST API. The Roles and Permissions table also needs member counts, a last-updated date, search, and sorting, which the role catalog (ADR 0028) does not provide.
Approach
POST,GET,PATCH, andDELETEon/api/authz/v1/roles/<role>/, plusPOST /api/authz/v1/roles/<role>/reassign/.user_countandupdated_aton every role, andsearch,sort_by, andorderon the list. Search and sort run in Python so translated static role names match what the user sees.revokeorreassign, in one transaction.Manual testing instructions
Docs only. Both files pass
python -m docutils --halt=warning.Rollback plan
Revert this PR. Docs only. No code or migration.
Retro compatibility
No behavior change. This PR only records the decision. The implementation will follow in separate PRs.
AI Usage
Kiro assisted with research and ADR authoring, with human guidance on the decisions and validation against the existing ADRs.
Merge checklist: