feat: Support filtering by multiple orgs in scopes endpoint#269
feat: Support filtering by multiple orgs in scopes endpoint#269rodmgwgu merged 2 commits intoopenedx:mainfrom
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. |
bd13215 to
8a1faa1
Compare
mariajgrimaldi
left a comment
There was a problem hiding this comment.
No notes. LGTM!
Thanks!
Adds an optional "orgs" query param to the
scopes/endpoint that accepts a comma-separated list of org names to use for filtering the scopes.Please note: an "org" query param already existed in that endpoint, but it only supported a single org name per request. We are keeping that optional param for compatibility reasons. If both params are present, both are used for filtering as if the org specified in the "org" query was part of the orgs list on the "orgs" query.
Additional information
Required by: openedx/frontend-app-admin-console#92
Unblocks: openedx/frontend-app-admin-console#111
Testing instructions
Using a local dev tutor installation, call the following endpoint with required credentials:
http://local.openedx.io:8000/api/authz/v1/scopes/?orgs=wgu,OpenedXThe user you use to test this should have permission to at least view one course or library.
You should see a response similar to this:
{ "count": 2, "next": null, "previous": null, "results": [ { "external_key": "course-v1:OpenedX+DemoX+DemoCourse", "display_name": "Open edX Demo Course", "org": { "id": 1, "created": "2026-04-02T19:30:36.779095Z", "modified": "2026-04-02T19:30:36.779095Z", "name": "OpenedX", "short_name": "OpenedX", "description": "", "logo": null, "active": true } }, { "external_key": "lib:WGU:CSPROB", "display_name": "Computer Science Problems", "org": { "id": 2, "created": "2026-04-02T19:31:21.196446Z", "modified": "2026-04-02T19:31:21.196446Z", "name": "WGU", "short_name": "WGU", "description": "", "logo": null, "active": true } } ] }If you change the orgs query params, for example, removing the "WGU" org name, only the "Open edX Demo Course" will be shown.
Deadline
Verawood
Merge checklist
Check off if complete or not applicable: