Skip to content

Allow Course Editors to import YouTube transcripts and surface errors #597

Done
openedx/openedx-platform
#39381

Description

@BryanttV

Description

Course Editors cannot import YouTube transcripts in the video editor. Every /transcripts/* view goes through _get_item, which uses the legacy has_course_author_access, so editors get a 403. The MFE ignores the error, so the user gets no feedback.

Current Behavior

/transcripts/check returns 403 for an Editor. The MFE only shows the import card when command == "import" and ignores the failed request (VideoSourceWidget/hooks.jsx:18-27), so the import option silently never appears.

Expected Behavior

An Editor can check and import transcripts, since the video editor already requires edit permission. If a request is denied, the MFE shows an error.

Steps to reproduce

  1. Log in as a Course Editor.
  2. Open the video editor for a video with a YouTube source.
  3. Observe that the transcript import card never appears and no error is shown (/transcripts/check returns 403).

Acceptance Criteria

  • _get_item in views/transcripts_ajax.py (lines 775-783) uses user_has_course_permission(..., COURSES_EDIT_COURSE_CONTENT, ..., LegacyAuthoringPermission.WRITE) instead of has_course_author_access.
  • Editors can check and import transcripts.
  • Users without edit permission (e.g. Auditor) still get 403.
  • (MFE, optional) checkTranscriptsForImport failures surface an error to the user.
  • Tests are added or updated.

Technical Notes

All views using _get_item serve the video editor, so requiring edit permission for all of them is consistent.

Metadata

Metadata

Assignees

Labels

willow

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions