Skip to content

Conversation

@farhaanbukhsh
Copy link
Member

@farhaanbukhsh farhaanbukhsh commented Mar 21, 2021

The condition added to ensure that if the feature is enabled
user will not be able to create the course outside of the organisation
in which they belong.

JIRA tickets: BB-3622

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

Dependencies: None

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:

  1. Get the devstack up and running
  2. Pull this branch in edx-platform
  3. Drop in the studio shell make dev.shell.studio
  4. vim /edx/etc/studio.yml
  5. In the FEATURES dictionary add RESTRICT_NON_ORG_COURSE_CREATION: true
  6. Now create a user either make it a staff user
  7. Go to the admin page and in localhost:18010/admin/student/courseaccessrole/ create a new entry, add the user, give it instructor privilege, don't add the Org yet
  8. Log in the studio and try creating the course, you should get an error
  9. Now in the course access role add an organization with which you were trying to create the course, save it.
  10. Try creating the course again, it should create the course.

Author notes and concerns:

  1. This is a port of code from Juniper to Koa,

Reviewers

* Add course creation condition for organization

The condition added to ensure that if the feature is enabled
user will not be able to create the course outside of the organization
in which they belong.

Signed-off-by: Farhaan Bukhsh <farhaan@opencraft.com>
@lgp171188
Copy link

@farhaanbukhsh, thanks for creating this PR. Since the Koa upgrade is not going to happen any time soon and the preparation work has to be done before that, I'd like to wait till the upstream review is done before backporting this to Koa. What do you say?

@pomegranited
Copy link

@farhaanbukhsh @lgp171188 your upstream PR https://github.com/edx/edx-platform/pull/26616 has merged -- do we still need this PR? If so, it should be rebased and made against opencraft-release/koa.3 instead, since that's our release branch.

Also, worth creating a PR to get this into lilac.master if it's needed for the next upgrade.

@farhaanbukhsh
Copy link
Member Author

@pomegranited I am planning to backport the fix for koa.3 and lilac.1, so I will be using this branch and PR to do the same. :) Thanks for the nudge. :)

@farhaanbukhsh
Copy link
Member Author

@pomegranited a lot of things changes so opening a clean PR was faster than rebase the current one :) so I am closing this PR in favor of #423 :) Hope that's okay.

@farhaanbukhsh farhaanbukhsh deleted the restrict-user-create-course-koa branch October 4, 2021 06:48
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