Adds email filtering to user admin view

This commit is contained in:
Mouse Reeve 2021-09-08 15:37:52 -07:00
parent 605af3bf88
commit 59096ae9ec

View file

@ -33,6 +33,9 @@ class UserAdminList(View):
scope = request.GET.get("scope") scope = request.GET.get("scope")
if scope and scope == "local": if scope and scope == "local":
filters["local"] = True filters["local"] = True
email = request.GET.get("email")
if email:
filters["email__endswith"] = email
users = models.User.objects.filter(**filters) users = models.User.objects.filter(**filters)