1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-15 22:54:24 +00:00

Add two factor status to admin cmd display (#20401)

This commit is contained in:
Tyrone Yeh 2022-07-19 16:43:49 +08:00 committed by GitHub
parent 00d3876c85
commit 4c7e51ee3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -632,9 +632,10 @@ func runListUsers(c *cli.Context) error {
} }
} }
} else { } 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 { 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])
} }
} }