feat: Add Waffle flag for AuthZ for Course Authoring#37985
feat: Add Waffle flag for AuthZ for Course Authoring#37985rodmgwgu wants to merge 3 commits intoopenedx:masterfrom
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. |
wgu-taylor-payne
left a comment
There was a problem hiding this comment.
Looks good. Just had one question come to mind.
| # .. toggle_creation_date: 2026-02-05 | ||
| # .. toggle_target_removal_date: 2027-06-09 | ||
| # .. toggle_tickets: https://github.com/openedx/openedx-platform/issues/37927 | ||
| AUTHZ_COURSE_AUTHORING_FLAG = CourseWaffleFlag('authz.enable_course_authoring', __name__) |
There was a problem hiding this comment.
Would this flag need to be available to the LMS (i.e. Instructor Dashboard)?
There was a problem hiding this comment.
Good question, the only flow that I know for sure would technically be on the LMS is the course team management that is also available on the Instructor Dashboard.
Do you think this flag should live elsewhere because of that? I'm not sure where it would be a good place to put it, any suggestions?
There was a problem hiding this comment.
Yeah, if we do anticipate using it in the course team management, I think we would want it in a common location such as openedx/core/toggles.py. @bmtcril Any input on where it makes sense to define the flag?
There was a problem hiding this comment.
Given that it's fairly tightly bound to CourseOverview I think it would be fair to put it in openedx/core/djangoapps/course_overviews where both sides can get at it. openedx/core/toggles.py would also make sense to me. I'll ask around at our standup for opinions, though.
There was a problem hiding this comment.
Seems like openedx/core/toggles.py is the consensus!
There was a problem hiding this comment.
Thanks! I'll do the change
Description
This PR adds a feature flag that will be used to toggle the new authorization implementation (openedx-authz) over the Course Authoring experience.
This is a temporary flag that will be deprecated after Willow as specified in this ADR: https://github.com/openedx/openedx-authz/blob/main/docs/decisions/0010-course-authoring-flag.rst
Supporting information
This is part of the Phase 2 of the RBAC AuthZ project, related ticket: #37927
The following ADR specifies the rationales and decisions related to this change: https://github.com/openedx/openedx-authz/blob/main/docs/decisions/0010-course-authoring-flag.rst
Testing instructions
How to use
To enable it globally:
To enable for a specific course (or override if it was previously enabled globally):
To enable for an org (or override if it was previously enabled globally):
How will the flag behave:
Caveats:
Waffle Flags allow configuring the flag to be enabled to specific users or groups of users. This won't be supported by the openedx-authz implementation because it would cause validation inconsistencies. A Waffle Switch would have been a better fit, but there are no existing ways to override Waffle Switchs for specific courses or orgs.
Deadline
Verawood release
Other information
This flag will be used in follow-up changes related to the RBAC AuthZ Phase 2 project.