Revert: Cannot rerun courses - authz role assignment expects rerun to already exist (#38840) (#38973)
* Revert "fix: Cannot rerun courses - authz role assignment expects rerun to already exist (#38840) (#38858)" This reverts commit ceb6a18eb3e0c886ae92cce673eb820bbf343c25. * fix: remove unused imports left after revert * fix: remove stray pre-38840 test reintroduced by conflict resolution test_create_course_disabled_by_flag and its 'authorized_staff_client' fixture belonged to the old TestCourseHandlerAuthz class, which an unrelated refactor (not #38840) had already replaced with the leaner TestCourseHandlerStaffAccess before #38840 was even merged. The revert's merge conflict was between that refactor and #38840's insertion point, not a real need to restore this method. * chore: upgrade openedx-authz to 1.22.0 1.22.0 ships the fix for openedx-authz#352 (role assignment on a course/library scope before its CourseOverview/ContentLibrary exists), which this revert depends on. * test: restore TestCourseRerunAuthz/TestCourseRerunLegacy coverage Per review feedback from @mariajgrimaldi: these test classes were removed as part of the literal revert of #38840, but they don't actually test the removed workaround itself — they test that rerun succeeds and grants correct access with authz enabled/disabled, which is exactly the behavior this revert needs to keep working now that openedx-authz#352 is implemented. Verified locally against the real devstack (openedx-authz 1.22.0+): all 7 tests pass unmodified against the reverted code. Cleaned up the docstrings that referenced the now-removed conditional add_instructor skip and created_user fallback, since add_instructor runs unconditionally pre-task again.
K
KEVYN SUAREZ committed
07f09868c1f851dc038988ca190f915db4c81438
Parent: 990d183
Committed by GitHub <noreply@github.com>
on 8/19/2026, 5:14:08 PM