-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: allow users who can create orgs to see the full list of orgs when creating a course [FC-0076] #1689
fix: allow users who can create orgs to see the full list of orgs when creating a course [FC-0076] #1689
Conversation
when creating a course
Thanks for the pull request, @pomegranited! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1689 +/- ##
==========================================
- Coverage 93.35% 93.35% -0.01%
==========================================
Files 1109 1109
Lines 22103 22103
Branches 4681 4763 +82
==========================================
- Hits 20635 20634 -1
- Misses 1403 1404 +1
Partials 65 65 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
- I tested this: I followed the testing instructions in detail
- I read through the code and considered the security, stability and performance implications of the changes.
- Includes tests for bugfixes and/or features added.
- Includes documentation
@hinakhadim Could you let us know whether this fixes the issue for your team? Then I'll backport it to Sumac. |
Thank you so much, @pomegranited, for the quick fix. Staff users can now create courses successfully. You can backport it to Sumac. However, the organization dropdown is quite long, requiring manual scrolling to find the desired organization (zoomed-out image attached). Ideally, we should be able to search for an organization using an input box and select it. Since this is a separate issue, I will create a new ticket for it. ![]() |
…n creating a course [FC-0076] (openedx#1689) The fixes for openedx#1577 caused issues with edx.org's Global Staff users not being able to create courses. edx.org/2U Global Staff are seeing an empty Organization drop-down list. This issue arose due to misuse of two similarly-named flags returned by the contentstore's home API * `can_create_organizations`: granted to Global Staff or everyone if `FEATURES[ENABLE_CREATOR_GROUP] == True`, * `allow_to_create_new_org`: which is actually about auto-creating organizations, so both `can_create_organizations` + `settings.ORGANIZATIONS_AUTOCREATE` must be True In this change, we use `canCreateOrganizations` to decide whether the user can see the full list of organizations when creating courses. We preserve the use of `allowToCreateNewOrg` when deciding whether to allow users to "typeahead" to create a new organization not in the drop-down list. (cherry picked from commit e5360dc)
Description
The fixes for #1577 caused issues with edx.org's Global Staff users not being able to create courses. edx.org/2U Global Staff are seeing an empty Organization drop-down list.
This issue arose due to misuse of two similarly-named flags returned by the contentstore's home API:
can_create_organizations
: granted to Global Staff or everyone ifFEATURES[ENABLE_CREATOR_GROUP] == True
, cf codeallow_to_create_new_org
: which is actually about auto-creating organizations, so bothcan_create_organizations
+settings.ORGANIZATIONS_AUTOCREATE
must be True, cf codeIn this change, we use
canCreateOrganizations
to decide whether the user can see the full list of organizations when creating courses. We preserve the use ofallowToCreateNewOrg
when deciding whether to allow users to "typeahead" to create a new organization not in the drop-down list.Supporting information
Testing instructions
ORGANIZATIONS_AUTOCREATE = False
to disallow org auto-creation when creating courses or libraries.Ensure you can select from the full list of organizations in the list, and that you're not allowed to type in a new organization name when creating a course.
Ensure you can only select your one org from the list, and that you can create courses in that org.
Repeat the above steps with the default
ORGANIZATIONS_AUTOCREATE = True
: