From 6c003c94f7a49dba6ae2ad524d4e830929c2a363 Mon Sep 17 00:00:00 2001 From: Jim Date: Wed, 14 Apr 2021 11:36:42 -0400 Subject: [PATCH] add "Is Primary" to auth method CLI output (#1115) --- internal/cmd/commands/authmethodscmd/funcs.go | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/internal/cmd/commands/authmethodscmd/funcs.go b/internal/cmd/commands/authmethodscmd/funcs.go index 024009eed..8e4dcd025 100644 --- a/internal/cmd/commands/authmethodscmd/funcs.go +++ b/internal/cmd/commands/authmethodscmd/funcs.go @@ -106,6 +106,12 @@ func (c *Command) printListTable(items []*authmethods.AuthMethod) string { fmt.Sprintf(" Description: %s", m.Description), ) } + if true { + output = append(output, + fmt.Sprintf(" Is Primary For Scope: %t", m.IsPrimary), + ) + } + if len(m.AuthorizedActions) > 0 { output = append(output, " Authorized Actions:", @@ -119,11 +125,12 @@ func (c *Command) printListTable(items []*authmethods.AuthMethod) string { func printItemTable(in *authmethods.AuthMethod) string { nonAttributeMap := map[string]interface{}{ - "ID": in.Id, - "Version": in.Version, - "Type": in.Type, - "Created Time": in.CreatedTime.Local().Format(time.RFC1123), - "Updated Time": in.UpdatedTime.Local().Format(time.RFC1123), + "ID": in.Id, + "Version": in.Version, + "Type": in.Type, + "Created Time": in.CreatedTime.Local().Format(time.RFC1123), + "Updated Time": in.UpdatedTime.Local().Format(time.RFC1123), + "Is Primary For Scope": in.IsPrimary, } if in.Name != "" {