openedx / openedx/openedx-authz
Add opt-in course-authoring filtering to authorization endpoints
- Dominant language
- Python
- Stars
- 0
- Forks
- 9
- Avg merge
- 13d 9h
- Merged PRs (30d)
- 9
Description
Description
Authorization endpoints (validate/me, and role assignment/removal in RoleUserAPIView) currently rely solely on Casbin permission checks. They have no way to account for the effective authz.enable_course_authoring waffle flag state for a given course scope.
As a result, a stale Casbin assignment can cause these endpoints to approve a permission check, or allow a role to be assigned or removed, for a course scope whose course-authoring flag is actually off. This creates a mismatch between what the authorization layer reports and what should actually be available/actionable for that scope.
There's currently no clean way to plug course-authoring-specific scope visibility logic into these shared authorization endpoints without either hardcoding course-authoring concerns into the shared authorization code, or duplicating checks across each endpoint.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.