mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-16 01:27:03 +02:00
edit users filter
This commit is contained in:
parent
cc0acdba94
commit
8424e20195
1 changed files with 6 additions and 1 deletions
|
@ -141,12 +141,17 @@ class MyUserAdmin(BaseUserAdmin):
|
|||
"group",
|
||||
"status",
|
||||
)
|
||||
|
||||
list_filter = (
|
||||
"is_active",
|
||||
"groups",
|
||||
)
|
||||
|
||||
# Let's define First group
|
||||
# (which should in theory be the ONLY group)
|
||||
def group(self, obj):
|
||||
if obj.groups.filter(name="full_access_group").exists():
|
||||
return "Super User"
|
||||
return "Full access"
|
||||
elif obj.groups.filter(name="cisa_analysts_group").exists():
|
||||
return "Analyst"
|
||||
return ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue