Skip to content

Commit

Permalink
Admin improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewelwell committed Jan 10, 2025
1 parent 8d28338 commit aeab732
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion api/custom_auth/mfa/trench/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,18 @@

@admin.register(MFAMethod)
class MFAMethodAdmin(admin.ModelAdmin):
pass
list_display = (
"user_email",
"name",
"is_active",
"is_primary",
"created_at",
"updated_at",
)
search_fields = ("user__email", "name")
list_filter = ("is_active", "is_primary")

list_select_related = ("user",)

def user_email(self, instance: MFAMethod) -> str:
return instance.user.email

Check warning on line 22 in api/custom_auth/mfa/trench/admin.py

View check run for this annotation

Codecov / codecov/patch

api/custom_auth/mfa/trench/admin.py#L22

Added line #L22 was not covered by tests

0 comments on commit aeab732

Please sign in to comment.