Skip to content

Commit 4c7e51e

Browse files
authored
Add two factor status to admin cmd display (#20401)
1 parent 00d3876 commit 4c7e51e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmd/admin.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -632,9 +632,10 @@ func runListUsers(c *cli.Context) error {
632632
}
633633
}
634634
} else {
635-
fmt.Fprintf(w, "ID\tUsername\tEmail\tIsActive\tIsAdmin\n")
635+
twofa := user_model.UserList(users).GetTwoFaStatus()
636+
fmt.Fprintf(w, "ID\tUsername\tEmail\tIsActive\tIsAdmin\t2FA\n")
636637
for _, u := range users {
637-
fmt.Fprintf(w, "%d\t%s\t%s\t%t\t%t\n", u.ID, u.Name, u.Email, u.IsActive, u.IsAdmin)
638+
fmt.Fprintf(w, "%d\t%s\t%s\t%t\t%t\t%t\n", u.ID, u.Name, u.Email, u.IsActive, u.IsAdmin, twofa[u.ID])
638639
}
639640

640641
}

0 commit comments

Comments
 (0)