Skip to content

Can't create course as user with course creator access when flag is enabled #354

Description

@mariajgrimaldi

Description

When authz.enable_course_authoring is enabled, a non-admin instructor user with course creator access for all organizations is unable to create a course from Studio.

The user can open the New course form and the organization dropdown is populated with available organizations. However, after filling out the course creation form and clicking Create, the POST /course/ request returns a 403.

This suggests that the user is allowed to see/select organizations in the course creation form, but the course creation permission check fails when submitting the form.

Steps to reproduce

  1. Enable authz.enable_course_authoring.
  2. Log in to Studio as a non-admin instructor user.
  3. Grant the user course creator access for all organizations from Django admin.
  4. Go back to Studio as the instructor user.
  5. Open the New course form.
  6. Fill in the course creation fields. Press create.

Expected behavior

The course should be created successfully.

Actual behavior

The course is not created. The POST /course/ request returns a 403 with the following response:

{
  "error": "User does not have the permission to create courses in this organization or course creation is disabled"
}

It only works when the flag authz.enable_course_authoring is off.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions