-
Notifications
You must be signed in to change notification settings - Fork 8
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
Restricted permissions to the course management page #934
Conversation
… if the user doesn't have permissions instead of redirecting them with a warning.
|
||
isRequestingForSelf = g.current_user == user | ||
if g.current_user.isCeltsAdmin or (g.current_user.isFaculty and isRequestingForSelf): | ||
setRedirectTarget("/serviceLearning/courseManagement") |
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.
Instead of always coming back to /serviceLearning/courseManagement
in setRedirectTarget
, we should come back to the original route they came in on (including the username if necessary). Check out the flask request
object
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 it!
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.
Still working on the newly found bug
|
||
isRequestingForSelf = g.current_user == user | ||
if g.current_user.isCeltsAdmin or (g.current_user.isFaculty and isRequestingForSelf): | ||
setRedirectTarget("/serviceLearning/courseManagement") |
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 it!
…te where the user came from and not our own course management page.
…ntSoftwareDevTeam/celts into Individual-course-management-929
We have fixed the redirection issue! May we merge now? |
We've changed the permissions for the course management pages for users to be restricted to all administrators and faculty that are attempting to view their own page. Faculty cannot view other faculty's pages and students should not have one so they cannot either.
Fixes issue #929