Repository navigation
fix: Studio v3 home: no write on GET, no-op org, public schema #39310
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
Open
Faraz32123
wants to merge
7
commits into
master
Choose a base branch
from
fix/studio-home-creator-status-read-only
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
6b33acc
fix: stop creating a CourseCreator row on Studio home GET
Faraz32123 0922264
fix: drop the no-op org parameter from the v3 home schema
Faraz32123 cc232ca
fix: publish Studio v3 home without x-internal
Faraz32123 32b2b99
fix: ignore course creator requests where the table is not used
Faraz32123 0a2046b
feat: let staff add course creator entries in the admin
Faraz32123 0b4e6c9
fix: publish only the home settings from Studio v3 home
Faraz32123 6f8c8a2
refactor: remove add_user_with_status_unrequested
Faraz32123 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| """ | ||
| Serializers for the v3 contentstore API. | ||
| """ | ||
|
|
||
| from cms.djangoapps.contentstore.rest_api.v1.serializers import StudioHomeSerializer | ||
|
|
||
|
|
||
| class StudioHomeContextSerializer(StudioHomeSerializer): | ||
| """ | ||
| The Studio home page settings, without the course and library lists. | ||
|
|
||
| The v3 home is built with ``get_home_context(request, True)``, which leaves | ||
| those lists empty; they are served by ``/api/authoring/v4/courses/`` and the | ||
| library APIs instead. | ||
| """ | ||
| archived_courses = None | ||
| courses = None | ||
| in_process_course_actions = None | ||
| libraries = None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
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.
On the side effect in the description: I think this needs a decision before merge rather than a note.
CourseCreatorAdminreturnsFalsefromhas_add_permissionand keepsusernameread-only, so an admin can no longer grant creator access to someone who hasn't requested it. Operators who pre-approve staff or instructors today lose that workflow.Two options I can see:
usereditable only on the add form;I'd lean towards the first, since it keeps the old capability without bringing back the write on GET.
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.
Agreed, went with the first option. Staff can add rows in the admin now;
useris picked by id on the add form and stays read-only on the change form. Added a test that adds a user who never requested access asgrantedthrough the admin and checks they land in the creator group. I've dropped the side-effect note from the description.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.
The add form covers the capability, thanks. It's still something operators will notice though: with
ENABLE_CREATOR_GROUPon by default, the Course Creator admin stops listing every user who has opened Studio, and granting access ahead of a request now goes through the add form. Can you add an entry for that to the Willow operator notes before this merges? https://openedx.atlassian.net/wiki/spaces/COMM/pages/6476169217/Willow+-+Operator+Dev+NotesSomething like:
Uh oh!
There was an error while loading. Please reload this page.
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.
Correction to my note above: the code side (the add form, user read-only on the change form, and the test) is in 6f8c8a2, but the Willow operator-notes entry asked for here is not on the page yet as of Nov 11. This stays open until that entry is added.
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.
I've added the entry to the Willow page myself, so this one is done. The last thing before this merges is the DEPR for the
coursesaction, can you link it here once it's open?