Repository navigation
feat: feature flag to disable Advanced Settings - #32015
farhaanbukhsh merged 1 commit into
Conversation
|
Thanks for the pull request, @0x29a! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
ca7f438 to
3ef9955
Compare
There was a problem hiding this comment.
👍
@0x29a I have added few nits, but it looks good overall!
- ✅ I tested this on master devstack
- ✅ I read through the code
- ❌ I checked for accessibility issues
- ✅ Includes documentation
- ❌ I made sure any change in configuration variables is reflected in the corresponding client's
configuration-securerepository.
There was a problem hiding this comment.
| 'advance_settings_url': reverse_course_url('advanced_settings_handler', course_block.id), | |
| 'advance_settings_url': reverse_course_url('advanced_settings_handler', course_block.id) if has_advanced_settings_access(request.user) else None, |
There was a problem hiding this comment.
@farhaanbukhsh, I did the same initially, but then I noticed this code above in this same file:
https://github.com/openedx/edx-platform/blob/9caa31bb063e23ab6a59638a84a1f07200309765/cms/templates/widgets/header.html#L27-L48
So, if context_course is True, the button will be showed despite DISABLE_ADVANCED_SETTINGS set to True.
There was a problem hiding this comment.
| % if advance_settings_access: | |
| % if advanced_settings_url: |
97c326e to
22974b2
Compare
There was a problem hiding this comment.
Should we also add global admin to this? Doesn't make sense to have staff but not admin!
22974b2 to
e207c9d
Compare
|
Hi @0x29a @farhaanbukhsh - is this ready to merge? If so, @farhaanbukhsh are you able to do so? |
There was a problem hiding this comment.
Can you clarify what is meant by 'staff' here? Is it django staff, or course staff?
e207c9d to
60a5b5a
Compare
|
Hi @mphilbrick211, neither me nor @farhaanbukhsh have merge rights. We just do our internal review before asking core contributors to make a final review. |
60a5b5a to
f45e8d1
Compare
@0x29a @mphilbrick211 I do have the merge access :) |
|
@0x29a 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
|
EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production. |
|
EdX Release Notice: This PR has been deployed to the production environment. |
|
After this was merged, we saw some unexpected behavior on our QA deployment with the advanced settings in Studio -- users who used to have access don't anymore. Can you clarify:
|
|
@pdpinch, thank you for reporting this. Looking at the code, I can't immediately tell where is the issue. Should we create a revert PR?
If it's not set, course admins and course staff should have access.
I updated the PR description. No, course admins won't have access. Only Django admin staff and superusers. |
This reverts commit 63d49d3.
Description
Adds the new Studio feature flag,
DISABLE_ADVANCED_SETTINGS, which disables access to course advanced settings for non-staff users. Also, it removes "Advanced Settings" from the "Settings" dropdown.Testing instructions
private-ref