From 42372698d3970e974fae923ff021e2eadffdc060 Mon Sep 17 00:00:00 2001 From: Sean Hammond Date: Wed, 2 Oct 2024 15:19:40 +0100 Subject: [PATCH] Remove an unused code path If the user isn't a member of the group then the call to `_check_access_permissions()` at the top of the method will have already caused the method to return. --- h/views/activity.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/h/views/activity.py b/h/views/activity.py index 809d5daa943..60af25c3024 100644 --- a/h/views/activity.py +++ b/h/views/activity.py @@ -10,7 +10,6 @@ from h.activity import query from h.i18n import TranslationString as _ from h.links import pretty_link -from h.models.group import ReadableBy from h.paginator import paginate from h.presenters.organization_json import OrganizationJSONPresenter from h.search import parser @@ -107,13 +106,6 @@ def search(self): # pylint: disable=too-complex result["opts"] = {"search_groupname": self.group.name} - # If the group has read access only for members and the user is not in that list - # return without extra info. - if self.group.readable_by == ReadableBy.members and ( - self.request.user not in self.group.members - ): - return result - def user_annotation_count(aggregation, userid): for user in aggregation: if user["user"] == userid: