Skip to content

Conversation

@farhaanbukhsh
Copy link
Member

@farhaanbukhsh farhaanbukhsh commented Oct 27, 2021

Ths PR ports the functionality introduced in https://github.com/edx/edx-platform/pull/26616

This PR is a clean port for #423 since we had an issue and we reverted the changes in #430

It's good to check physically the library and course creation and utility

JIRA tickets: BB-3622

Discussions: Link to any public dicussions about this PR or the design/architecture. Otherwise omit this.

Dependencies: None

Screenshots: Upstream PR

Sandbox URL: TBD - sandbox is being provisioned.

Merge deadline: "None" if there's no rush, "ASAP" if it's critical, or provide a specific date if there is one.

Testing instructions:

Upstream PR

Author notes and concerns:

None

Reviewers

…6616)

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

Signed-off-by: Farhaan Bukhsh <farhaan@opencraft.com>
@farhaanbukhsh farhaanbukhsh changed the title feat: grant course/library creation rights by organization (#26616) [BB-5025] Port feat grant course/library creation rights by organization to koa.3 Oct 27, 2021
Copy link

@0x29a 0x29a left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • I tested this: studio is working fine.
  • I read through the diff between this and the reverted PR:
    diff --git a/cms/djangoapps/contentstore/views/course.py b/cms/djangoapps/contentstore/views/course.py
    index 0dfb4903d0..4f2a49f04f 100644
    --- a/cms/djangoapps/contentstore/views/course.py
    +++ b/cms/djangoapps/contentstore/views/course.py
    @@ -568,7 +568,7 @@ def course_listing(request):
             'libraries_enabled': LIBRARIES_ENABLED,
             'redirect_to_library_authoring_mfe': should_redirect_to_library_authoring_mfe(),
             'library_authoring_mfe_url': LIBRARY_AUTHORING_MICROFRONTEND_URL,
    -        'libraries': [format_library_for_view(lib) for lib in libraries],
    +        'libraries': [format_library_for_view(lib, request) for lib in libraries],
             'show_new_library_button': user_can_create_library(user) and not should_redirect_to_library_authoring_mfe(),
             'user': user,
             'request_course_creator_url': reverse('request_course_creator'),

@farhaanbukhsh farhaanbukhsh merged commit f87d68c into opencraft-release/koa.3 Oct 28, 2021
@farhaanbukhsh farhaanbukhsh deleted the farhaan/bb-5025-port-org-course-features branch October 28, 2021 19:11
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.

3 participants