From fbab690f2ffcad016a9de62339d15e820fefa63c Mon Sep 17 00:00:00 2001 From: Alan Zhu <2025azhu@tjhsst.edu> Date: Sat, 5 Oct 2024 01:29:54 -0400 Subject: [PATCH] fix: actually allow club announcements sponsors to modify --- intranet/apps/announcements/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intranet/apps/announcements/models.py b/intranet/apps/announcements/models.py index 390ed79608..814a95c62a 100644 --- a/intranet/apps/announcements/models.py +++ b/intranet/apps/announcements/models.py @@ -155,7 +155,7 @@ def can_modify(self, user): return ( user.is_announcements_admin or self.is_club_announcement - and (self.is_visible_submitter(user) or user.club_sponsor_for_set.filter(id=self.activity.id).exists()) + and (user in self.activity.officers.all() or user in self.activity.sponsors.all() or user in self.activity.club_sponsors.all()) ) # False, not None. This can be None if no AnnouncementRequest exists for this Announcement,