add new user fields to grpc and list command (#2202)

Updates #2166

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
Kristoffer Dalby 2024-10-18 08:20:03 -06:00 committed by GitHub
parent b6dc6eb36c
commit 028d9aab73
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 129 additions and 52 deletions

View file

@ -164,13 +164,15 @@ var listUsersCmd = &cobra.Command{
SuccessOutput(response.GetUsers(), "", output)
}
tableData := pterm.TableData{{"ID", "Name", "Created"}}
tableData := pterm.TableData{{"ID", "Name", "Username", "Email", "Created"}}
for _, user := range response.GetUsers() {
tableData = append(
tableData,
[]string{
user.GetId(),
user.GetDisplayName(),
user.GetName(),
user.GetEmail(),
user.GetCreatedAt().AsTime().Format("2006-01-02 15:04:05"),
},
)