Files
edx-platform/lms/djangoapps/courseware/testutils.py
Kyle McCormick 1f392bdc3e fix: render_xblock was denying access to staff masquerading as learners (#27017)
The render_xblock view, which powers the Learning
MFE (among other things) returned a 404 when un-
enrolled course staff users tried to load it while
masquerading as learners. This was because we
checked course access after enabling the
masquerading context, which triggered a redirect-
to-enrollment exception.

The fix is simply to enable the masquerading
context after checking course access.
Content-level behavior and access is still
calculated within the masquerading context,
as intended.

TNL-7989
2021-03-15 16:50:33 -04:00

11 KiB