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

Give privileged groups archive access regardless of Humanities affiliation #609

Merged
merged 7 commits into from
Feb 19, 2024

Conversation

miggol
Copy link
Contributor

@miggol miggol commented Feb 14, 2024

Currently it's kind of weird that a secretary or chamber member can't view the archive if they're not in the humanities faculty. This PR resolves this by allowing privileged groups in.

Notes:

  • I initially changed FacultyRequiredMixin to use UserPassesTestMixin to be able to chain it with the new mixin. But once I had written the utility function for the menus, I realized this was ultimately unnecessary. Because I do believe UserPassesTestMixin offers more flexibility, I left this change in. But I'm happy to revert it, there's an argument to be made for both methods.

@miggol miggol linked an issue Feb 14, 2024 that may be closed by this pull request
@miggol miggol requested review from tymees and EdoStorm96 February 14, 2024 12:57
Copy link
Member

@tymees tymees left a comment

Choose a reason for hiding this comment

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

Aside from one small oversight, looks good. If you address my one comment it's approved, no re-review needed.

main/utils.py Outdated
Comment on lines 148 to 151
"AK",
"LK",
"Secretaris",
"Primaire secretaris",
Copy link
Member

Choose a reason for hiding this comment

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

Please use the values in constants.py

Copy link
Contributor

@EdoStorm96 EdoStorm96 left a comment

Choose a reason for hiding this comment

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

Looks good! approve :)

@miggol miggol merged commit fc7c120 into develop Feb 19, 2024
3 of 4 checks passed
@miggol miggol deleted the feature/improve_archive_access branch March 7, 2024 11:28
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.

Allow privileged users access to the archive regardless of faculty
3 participants