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