Adds local only filter to user admin view

This commit is contained in:
Mouse Reeve
2021-08-16 08:51:23 -07:00
parent 343e5772d2
commit 71404fae06
2 changed files with 4 additions and 0 deletions

View File

@ -30,6 +30,9 @@ class UserAdminList(View):
username = request.GET.get("username")
if username:
filters["username__icontains"] = username
scope = request.GET.get("scope")
if scope:
filters["local"] = scope == "local"
users = models.User.objects.filter(**filters)