Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
taran-p committed Sep 4, 2024
1 parent ad005e1 commit c306116
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions cmd/auto-complete.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,9 @@ var completeCmds = map[string]complete.Predictor{
"/idp/ldap/accesskey/remove": aliasCompleter,
"/idp/ldap/accesskey/rm": aliasCompleter,
"/idp/ldap/accesskey/info": aliasCompleter,
"/idp/ldap/accesskey/edit": aliasCompleter,
"/idp/ldap/accesskey/enable": aliasCompleter,
"/idp/ldap/accesskey/disable": aliasCompleter,

"/admin/policy/info": aliasCompleter,
"/admin/policy/update": aliasCompleter,
Expand Down
2 changes: 1 addition & 1 deletion cmd/idp-ldap-accesskey-edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func mainIDPLdapAccesskeyEdit(ctx *cli.Context) error {
fatalIf(err, "Unable to initialize admin connection.")

e := client.UpdateServiceAccount(globalContext, accessKey, opts)
fatalIf(probe.NewError(e), "Unable to add service account.")
fatalIf(probe.NewError(e), "Unable to edit service account.")

m := ldapAccesskeyMessage{
op: "edit",
Expand Down
5 changes: 5 additions & 0 deletions cmd/idp-ldap-accesskey-info.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,13 @@ func (m ldapAccesskeyMessage) String() string {
if m.ImpliedPolicy {
policyStr = "implied"
}
statusStr := "enabled"
if m.AccountStatus == "off" {
statusStr = "disabled"
}
o.WriteString(iFmt(0, "%s %s\n", labelStyle.Render("Access Key:"), m.AccessKey))
o.WriteString(iFmt(0, "%s %s\n", labelStyle.Render("Parent User:"), m.ParentUser))
o.WriteString(iFmt(0, "%s %s\n", labelStyle.Render("Status:"), statusStr))
o.WriteString(iFmt(0, "%s %s\n", labelStyle.Render("Policy:"), policyStr))
o.WriteString(iFmt(0, "%s %s\n", labelStyle.Render("Name:"), m.Name))
o.WriteString(iFmt(0, "%s %s\n", labelStyle.Render("Description:"), m.Description))
Expand Down

0 comments on commit c306116

Please sign in to comment.