Skip to content

Commit

Permalink
Remove an unused code path
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
seanh committed Oct 8, 2024
1 parent f876f2d commit 4237269
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions h/views/activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 4237269

Please sign in to comment.