Skip to content

Commit

Permalink
Add two factor status to admin cmd display (#20401)
Browse files Browse the repository at this point in the history
  • Loading branch information
tyroneyeh authored Jul 19, 2022
1 parent 00d3876 commit 4c7e51e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -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])
}

}
Expand Down

0 comments on commit 4c7e51e

Please sign in to comment.