-
Notifications
You must be signed in to change notification settings - Fork 167
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 from staff to admin route #3043
Transfer groundControl from staff to admin route #3043
Conversation
Pull Request Test Coverage Report for Build 11008345446Details
💛 - Coveralls |
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!
Waiting for the BE PR before merging. |
src/commons/sagas/RequestsSaga.ts
Outdated
* GET /courses/{courseId}/admin/users/{studentCourseRegId}/goals | ||
* GET /courses/{courseId}/staff/users/{studentCourseRegId}/goals |
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.
Let's not do this. /admin
doesn't refer to the role; it refers to (course) administration.
It's a sub-resources belonging to the REST resource which is the course itself.
The role check is transparent (i.e. unknown to) the frontend; you shouldn't be able to tell based on the endpoint what are the checks.
@RichDom2185 backend PR is ready now. I have replaced all non-dangerous routes to use a "/staff" instead of "/admin" URL to connect to the backend. I have also changed the routes in the backend directly. All seems good, but I am not sure if I have advertently broken some frontend-backend link. Any automated way to test it? |
@josh1248 not really, I think best to just not touch it. Refer to my comments above. Basically your endpoints paths should be related to your resource. E.g. GET /users/{id}/name or something like that |
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!
Description
Addresses #3031 by re-routing ground control from a staff to an admin route.
P.S.: still figuring out the backend. Will further changes be required?
Type of change
How to test
Enter the test environment as an admin, and see that you are able to enter ground control normally.
Copy the ground control route (should be '/groundcontrol')
Switch the test environment to be a staff
Check that the ground control button is now missing.
Paste the ground control route. A 404 route should be expected.
Go to
src/commons/navigationBar/AcademyNavigationBar
and change the ground control route into a staff route.Log in as staff. Manually append '/groundcontrol' to the URL to get to the ground control screen.
Attempt to delete an assessment, or mass publish an assessment through the ground control panel.
A 403 Forbidden error should show up.
Other functions, such as unpublishing or publishing of a single submission in the gradings table, should still be possible.
Checklist