Skip to content
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

Merged
merged 6 commits into from
Jun 15, 2023

Conversation

hoerstl
Copy link
Contributor

@hoerstl hoerstl commented Jun 15, 2023

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


isRequestingForSelf = g.current_user == user
if g.current_user.isCeltsAdmin or (g.current_user.isFaculty and isRequestingForSelf):
setRedirectTarget("/serviceLearning/courseManagement")
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On it!

Copy link
Contributor Author

@hoerstl hoerstl left a 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")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On it!

hoerstl and others added 3 commits June 15, 2023 10:27
@github-actions
Copy link

View Code Coverage

@hoerstl
Copy link
Contributor Author

hoerstl commented Jun 15, 2023

We have fixed the redirection issue! May we merge now?

@hoerstl hoerstl merged commit 86d88e9 into development Jun 15, 2023
5 checks passed
@hoerstl hoerstl deleted the Individual-course-management-929 branch June 15, 2023 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Individual course management page should only be visible to individual and admin
3 participants