@@ -426,18 +426,10 @@ class TestCourseRerunAuthz(
426426 """
427427 Tests for course rerun behavior when authz.enable_course_authoring is enabled.
428428
429- Verifies that:
430- - Rerun succeeds without calling add_instructor pre-task (which would fail
431- because CourseOverview doesn't exist yet).
432- - add_instructor is called in the task after clone_course, when CourseOverview
433- can be resolved.
434- - The initiating user can see in-process rerun status via created_user check.
435-
436- TODO: These tests cover a temporary workaround needed while (1) the authz system
437- doesn't support pre-assigning roles without a CourseOverview, and (2) we support
438- both authz and legacy systems simultaneously. Once openedx/openedx-authz#352 is
439- implemented, this class can be simplified — the conditional skip of add_instructor
440- and the created_user visibility fallback will no longer be needed.
429+ Verifies that rerun succeeds and grants proper access even though add_instructor
430+ is called for the destination course key before its CourseOverview exists
431+ (openedx-authz#352 makes role assignment succeed ahead of the object, backfilling
432+ the link once clone_course creates it).
441433 """
442434
443435 def setUp (self ):
@@ -467,8 +459,8 @@ def setUp(self):
467459 def test_rerun_succeeds_with_authz_enabled (self ):
468460 """
469461 Test that course rerun completes successfully when authz.enable_course_authoring
470- is enabled. Previously this would fail with CourseOverview.DoesNotExist because
471- add_instructor was called before the course was cloned.
462+ is enabled, granting the initiating user instructor/staff access on the
463+ destination course before it's cloned.
472464 """
473465 response = self .staff_client .ajax_post (self .url , {
474466 'source_course_key' : str (self .source_course_key ),
@@ -516,8 +508,7 @@ def test_rerun_does_not_create_legacy_roles_with_authz_enabled(self):
516508 def test_rerun_grants_authz_permissions_after_clone (self ):
517509 """
518510 Test that after a successful rerun with authz enabled, the user has proper
519- permissions via the authz layer (add_instructor is called in the task after
520- clone_course completes and CourseOverview is available).
511+ permissions via the authz layer on the newly created destination course.
521512 """
522513 response = self .staff_client .ajax_post (self .url , {
523514 'source_course_key' : str (self .source_course_key ),
@@ -537,8 +528,8 @@ def test_rerun_grants_authz_permissions_after_clone(self):
537528 def test_in_process_rerun_visible_to_initiating_user (self ):
538529 """
539530 Test that the user who initiated the rerun can see the in-process status
540- via the created_user check in get_in_process_course_actions, even when
541- authz permissions haven't been fully established yet .
531+ in get_in_process_course_actions, via the instructor/staff access already
532+ granted on the destination course .
542533 """
543534 dest_course_key = CourseLocator (org = 'testorg' , course = '101' , run = 'in_progress_rerun' )
544535 CourseRerunState .objects .initiated (
0 commit comments