Skip to content

backport grant course creation permission#668

Merged
DonatoBD merged 3 commits intomasterfrom
cag/backport-grant-course-creation-permission
Dec 26, 2022
Merged

backport grant course creation permission#668
DonatoBD merged 3 commits intomasterfrom
cag/backport-grant-course-creation-permission

Conversation

@Ian2012
Copy link
Contributor

@Ian2012 Ian2012 commented Sep 27, 2022

This PR backports the functionality of managing course creator permissions from the CourseCreator table which is still kind of compatible with our custom development performed in BC-14 but adds another layer of verification as these changes are only in the backend.

Regarding the frontend there is a PR on upstream to add the selector we currently use.

For this to work, we still need to revert all commits related to our custom development and only let this one. Also, we need to migrate the permissions for courseaccessrole to CourseCreator

Upstream PR

@felipemontoya
Copy link
Member

for context: this work should be merged before the nutmeg migration, but we need to ensure that we do every step in a stable manner.

Probably something like this:

  1. only BC-14 way (current status)
  2. we add this while keeping the UI working both with BC-14 and this.
  3. we make eox-manage use this backend instead of BC-14
  4. we migrate all old data from BC-14 into this
  5. we remove BC-14 code and data

@Ian2012 Ian2012 force-pushed the cag/backport-grant-course-creation-permission branch from 190a3f7 to 2d768ec Compare December 7, 2022 21:57
farhaanbukhsh and others added 3 commits December 20, 2022 11:16
Current State (before this commit):

  Studio, as of today doesn't have a way to restrict a user to
  create a course in a particular organization. What Studio
  provides right now is a CourseCreator permission which gives
  an Admin the power to grant a user the permission to create
  a course.

  For example: If the Admin has given a user Spiderman the
  permission to create courses, Spiderman can now create courses
  in any organization i.e Marvel as well as DC.
  There is no way to restrict Spiderman from creating courses
  under DC.

Purpose of this commit:

  The changes done here gives Admin the ability to restrict a
  user on an Organization level from creating courses via the
  Course Creators section of the Studio Django administration
  panel.

  For example: Now, the Admin can give the user Spiderman the
  privilege of creating courses only under Marvel organization.
  The moment Spiderman tries to create a course under some
  other organization(i.e DC), Studio will show an error message.

  This change is available to all Studio instances that
  enable the FEATURES['ENABLE_CREATOR_GROUP'] flag.
  Regardless of the flag, it will not affect any instances that choose
  not to use it.

BB-3622

(cherry picked from commit 48ad7ef)
@Ian2012 Ian2012 force-pushed the cag/backport-grant-course-creation-permission branch from af62421 to 72db189 Compare December 20, 2022 16:16
@DonatoBD DonatoBD merged commit 3dce5ff into master Dec 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants