You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix XBlock studio handler silently dropping Course Editor writes #598
When an XBlock studio handler (e.g. Drag and Drop, Survey) is called by a Course Editor, the changes are not persisted, yet the handler returns 200 and the UI reports success. This is silent data loss.
Current Behavior
component_handler (views/component.py:567) decides whether to persist using the legacy has_course_author_access. Editors have no legacy role (LEGACY_COURSE_ROLE_EQUIVALENCES does not include them), so update_item is skipped and only a warning is logged. The response is still 200.
Expected Behavior
Editors' changes are persisted. Callers without permission get an explicit 403 instead of a fake success.
Steps to reproduce
Log in as a Course Editor.
Edit a Drag and Drop (or Survey) component and save.
Observe the success message, then reload and see the change was not saved.
Acceptance Criteria
component_handler persists with update_item when user_has_course_permission(request.user, COURSES_EDIT_COURSE_CONTENT.identifier, usage_key.course_key, LegacyAuthoringPermission.WRITE) is true.
When the user lacks permission and the handler changed fields, the response is 403 rather than a silent 200.
Activity