Ongoing OIDC: return the primary account info along with the user. (#1145)

This commit is contained in:
Jim authored and GitHub committed 2021-04-20 20:33:56 -04:00
1 parent a90a64d787
commit 75108cbc8b
33 files changed
+1514 -643

No files matched your search

+33
View File
@@ -179,6 +179,27 @@ func (c *Command) printListTable(items []*users.User) string {
fmt.Sprintf(" Description: %s", u.Description),
)
}
if u.PrimaryAccountId != "" {
output = append(output,
fmt.Sprintf(" Primary Account ID: %s", u.PrimaryAccountId),
)
}
if u.LoginName != "" {
output = append(output,
fmt.Sprintf(" Login Name: %s", u.LoginName),
)
}
if u.FullName != "" {
output = append(output,
fmt.Sprintf(" Full Name: %s", u.FullName),
)
}
if u.Email != "" {
output = append(output,
fmt.Sprintf(" Email: %s", u.Email),
)
}
if len(u.AuthorizedActions) > 0 {
output = append(output,
" Authorized Actions:",
@@ -204,6 +225,18 @@ func printItemTable(in *users.User) string {
if in.Description != "" {
nonAttributeMap["Description"] = in.Description
}
if in.PrimaryAccountId != "" {
nonAttributeMap["PrimaryAccountId"] = in.PrimaryAccountId
}
if in.LoginName != "" {
nonAttributeMap["LoginName"] = in.LoginName
}
if in.FullName != "" {
nonAttributeMap["FullName"] = in.FullName
}
if in.Email != "" {
nonAttributeMap["Email"] = in.Email
}
maxLength := base.MaxAttributesLength(nonAttributeMap, nil, nil)