diff options
author | Tyrone Yeh <tyrone_yeh@draytek.com> | 2022-07-19 16:43:49 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-19 09:43:49 +0100 |
commit | 4c7e51ee3a7f1789e83b7f1aa34cd16f5a2d5648 (patch) | |
tree | 2b410836254acc8ca08c9d2e913fb3f2f71be1af /cmd | |
parent | 00d3876c8582e6b706f5f21a7c57dfee209a017c (diff) | |
download | gitea-4c7e51ee3a7f1789e83b7f1aa34cd16f5a2d5648.tar.gz gitea-4c7e51ee3a7f1789e83b7f1aa34cd16f5a2d5648.zip |
Add two factor status to admin cmd display (#20401)
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/admin.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/admin.go b/cmd/admin.go index 524cc30563..3375435749 100644 --- a/cmd/admin.go +++ b/cmd/admin.go @@ -632,9 +632,10 @@ func runListUsers(c *cli.Context) error { } } } else { - fmt.Fprintf(w, "ID\tUsername\tEmail\tIsActive\tIsAdmin\n") + twofa := user_model.UserList(users).GetTwoFaStatus() + fmt.Fprintf(w, "ID\tUsername\tEmail\tIsActive\tIsAdmin\t2FA\n") for _, u := range users { - fmt.Fprintf(w, "%d\t%s\t%s\t%t\t%t\n", u.ID, u.Name, u.Email, u.IsActive, u.IsAdmin) + 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]) } } |