fix: fetch org list only for course creator granted status and course admin can create new library #588
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes two bugs :
The get_organizations is used to fetch a list of orgs which a user is allowed to create courses/libraries for. The course creator status for the user is used here to determine which orgs to display to the user.
However, currently all orgs are fetched for users even with course creator status in
unrequested
orpending
state. This is a bug which is being fixed with this PR.Currently course staff has the ability to create new libraries for their respective orgs. But when a course staff user is "promoted" to course instructor/admin role, the user loses this ability. This bug is fixed with the PR too.
Supporting information
Link to other information about the change, such as Jira issues, GitHub issues, or Discourse discussions.
Be sure to check they are publicly readable, or if not, repeat the information here.
Testing instructions
fetch org list only for course creator granted status:
ENABLE_ORGANIZATION_STAFF_ACCESS_FOR_CONTENT_LIBRARIES
feature flag in Studio toFalse
.New Library
button on the studio homepageCourse instrutors cannot create new library even though course staff can:
New Library
button is visible on the studio homepage.New Library
button is still visible on the studio homepage.Deadline
"None" if there's no rush, or provide a specific date or event (and reason) if there is one.
Other information
BB-7827