-
Notifications
You must be signed in to change notification settings - Fork 50
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
Transfer groundControl (and admin panel) from staff to admin route #1180
Open
josh1248
wants to merge
27
commits into
source-academy:master
Choose a base branch
from
GabrielCWT:No-GC-For-Staff
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.
+290
−95
Conversation
This file contains 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
The new scope has caused the test error codes to change from 400 to 403 - will update the tests for staffs and admins. |
This swap prevents the all-staff route, "/grading/:submissionid/:questionid", from pattern matching and overshadowing the admin-only route "/grading/:assessmentid/publish_all_grades". Thankfully, no admin routes overshadow staff routes, so a quick fix can be done here.
Create test cases to indicate that non-admin staff can only read assets, but not create, modify, or delete them.
Updates positive test auth from staff to admin, adds negative tests to ensure that non-admin staff are unable to read, update, create, or delete course configs.
Update the modification / deletion test auth from staff to admin, and create tests to ensure that non-admin staff are not able to delete / unpublish them
This reverts commit 831ca60.
Ready for review! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Accompanies the frontend pull request at source-academy/frontend#3043
Previously, "admin" routes were available to both staff and admins to access.
Now, a new "staff" route has been created that accepts most of the previous functions. The remaining functions in "admin" scope have the ability to cause massive damage, such as the deletion of entire assessments. Hence, they are now inaccessible to avengers even if they bypass the frontend route checking.
Aside: I have also shifted admin panel actions into this admin scope.