add "Is Primary" to auth method CLI output (#1115)

This commit is contained in:
Jim authored and GitHub committed 2021-04-14 11:36:42 -04:00
1 parent e002209a5c
commit 6c003c94f7
1 file changed
+12 -5
+12 -5
View File
@@ -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 != "" {