feat: add Waffle flag to control start date access for masquerading users#37547
Conversation
|
Thanks for the pull request, @Agrendalath! 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. |
…sers This introduces the `ENFORCE_MASQUERADE_START_DATES` flag. When the flag is disabled (default), masquerading users bypass start dates. When the flag is enabled, masquerading users see the same start date restrictions as regular students.
116f4fd to
890b826
Compare
Description
Staff members masquerading as students currently bypass start date restrictions, which means they don't experience the course the same way students do. This makes it difficult to accurately preview and test how content will appear to students based on section and subsection start dates.
This PR adds the
course_experience.enforce_masquerade_start_datesWaffle flag to allow enforcing start date restrictions for masquerading users. When enabled, staff viewing the course as a masqueraded student will see the same start date restrictions as actual students, providing a more accurate preview experience.The flag is disabled by default, preserving the existing bypass behavior to avoid disrupting current workflows.
Testing instructions
course_experience.enforce_masquerade_start_datesWaffle flag (/admin/waffle/flag/).Deadline
None.
Other information
When enabled, masquerading into a course with a future start date will lock staff out of that course in the current session. Staff will need to log out and back in to regain normal access (or just wait until the course starts). I did not modify this behavior to avoid making too invasive changes to the code that handles permissions (high risk).
Private-ref: BB-9603