diff --git a/hypha/apply/activity/messaging.py b/hypha/apply/activity/messaging.py index 8af8a37bf304483fabad656fa7b0792623e7ff43..7037e0ee5e74e3a54da9df467cf8fdc5fd0b2895 100644 --- a/hypha/apply/activity/messaging.py +++ b/hypha/apply/activity/messaging.py @@ -266,6 +266,7 @@ class ActivityAdapter(AdapterBase): MESSAGES.APPROVE_PROJECT, MESSAGES.REQUEST_PROJECT_CHANGE, MESSAGES.SEND_FOR_APPROVAL, + MESSAGES.NEW_REVIEW, ]: return {'visibility': TEAM} @@ -273,15 +274,6 @@ class ActivityAdapter(AdapterBase): if is_transition(message_type) and not source.phase.permissions.can_view(source.user): # User's shouldn't see status activity changes for stages that aren't visible to the them return {'visibility': TEAM} - - # To fix visibility issue of review - if message_type in [ - MESSAGES.NEW_REVIEW, - MESSAGES.EDIT_REVIEW, - MESSAGES.DELETE_REVIEW, - ]: - return {'visibility': REVIEWER} - return {} def reviewers_updated(self, added=list(), removed=list(), **kwargs): diff --git a/hypha/apply/activity/models.py b/hypha/apply/activity/models.py index f6fd59861a37b91b62841f57da85181984c4010f..cbd82e72060d406a929c30b2dd18630d3d6a2989 100644 --- a/hypha/apply/activity/models.py +++ b/hypha/apply/activity/models.py @@ -47,7 +47,7 @@ class BaseActivityQuerySet(models.QuerySet): messages = ActivityAdapter.messages if user.is_applicant: return self.exclude( - message__in=[messages.get(MESSAGES.NEW_REVIEW), messages.get(MESSAGES.REVIEW_OPINION)] + message=messages.get(MESSAGES.NEW_REVIEW) ).filter(visibility__in=self.model.visibility_for(user)) return self.filter(visibility__in=self.model.visibility_for(user))