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

fix: enforce announcement visibility restrictions (closes tjcsl#1677) #1678

Merged
merged 1 commit into from
May 19, 2024

Conversation

aarushtools
Copy link
Contributor

@aarushtools aarushtools commented May 6, 2024

Proposed changes

  • Stop restricted announcements from being found via search and seen via announcement permalink if it is not supposed to be seen by the user

Brief description of rationale

  • Announcements that are not visible to a user's group on the home page are still visible via permalink and search. The suggested changes will make the visibility restrictions consistent across the board so users do not see an announcement they are restricted from

@aarushtools aarushtools requested a review from a team as a code owner May 6, 2024 18:12
@aarushtools
Copy link
Contributor Author

Should I add fix(announcements) to the commit or just keep it at fix because I modified the search app too?

@aarushtools aarushtools marked this pull request as draft May 6, 2024 20:17
@alanzhu0
Copy link
Member

fix(announcements) is fine.
Don't manually check group membership - use this instead: https://github.com/aarushtools/ion/blob/16092e04d1656099cc349de2c559797573ec3ca0/intranet/apps/announcements/models.py#L16

@aarushtools aarushtools force-pushed the announcement-permissions-fix branch 3 times, most recently from 660d357 to 72ad5d5 Compare May 19, 2024 15:33
@aarushtools aarushtools force-pushed the announcement-permissions-fix branch from 72ad5d5 to 69a1fe7 Compare May 19, 2024 15:36
@aarushtools aarushtools marked this pull request as ready for review May 19, 2024 15:53
Copy link
Member

@alanzhu0 alanzhu0 left a comment

Choose a reason for hiding this comment

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

Good work!

@alanzhu0 alanzhu0 merged commit d745f3c into tjcsl:dev May 19, 2024
5 of 6 checks passed
@aarushtools aarushtools deleted the announcement-permissions-fix branch May 19, 2024 19:27
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.

None yet

2 participants