-
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
Transfer groundControl (and admin panel) from staff to admin route #1180
Conversation
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! |
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.
Can you revert all the unnecessary changes? Refer to the diff for the (I think mostly autogenerated) changes. Thanks!
Apologies for missing this out - I have reverted the accidental formatting changes! |
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.
LGTM, thanks!
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.