Skip to content

Commit

Permalink
Revert "Prevent user search endpoint from returning all user profiles (
Browse files Browse the repository at this point in the history
…#1088)"

This reverts commit dd476bb.
  • Loading branch information
jarosenb authored Aug 21, 2023
1 parent dd476bb commit 7658c3a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions designsafe/apps/api/users/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,11 @@ def get(self, request):
if role:
logger.info(role)
user_rs = user_rs.filter(groups__name=role)

# Throw error if no filtering is specified.
return HttpResponseNotFound()
resp = [model_to_dict(u, fields=resp_fields) for u in user_rs]
if len(resp):
return JsonResponse(resp, safe=False)
else:
return HttpResponseNotFound()


class PublicView(View):
Expand Down

0 comments on commit 7658c3a

Please sign in to comment.