From bbbc24c9dae04605611b0c2c3ede3bff07b02ba5 Mon Sep 17 00:00:00 2001 From: Taran Date: Mon, 6 Jan 2025 12:54:22 -1000 Subject: [PATCH] Change enable to "enable=" --- cmd/idp-openid-subcommands.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/cmd/idp-openid-subcommands.go b/cmd/idp-openid-subcommands.go index ca0fd59b4b..3d678b3f42 100644 --- a/cmd/idp-openid-subcommands.go +++ b/cmd/idp-openid-subcommands.go @@ -416,12 +416,16 @@ func (i idpConfig) String() string { return "Not configured." } + enableStr := "on" // Determine required width for key column. fieldColWidth := 0 for _, kv := range i.Info { if fieldColWidth < len(kv.Key) { fieldColWidth = len(kv.Key) } + if kv.Key == "enable" { + enableStr = kv.Value + } } // Add 1 for the colon-suffix in each entry. fieldColWidth++ @@ -439,7 +443,14 @@ func (i idpConfig) String() string { PaddingLeft(1) var lines []string + lines = append(lines, fmt.Sprintf("%s%s", + fieldColStyle.Render("enable:"), + valueColStyle.Render(enableStr), + )) for _, kv := range i.Info { + if kv.Key == "enable" { + continue + } envStr := "" if kv.IsCfg && kv.IsEnv { envStr = " (environment)" @@ -509,7 +520,7 @@ func idpEnableDisable(ctx *cli.Context, isOpenID, enable bool) error { idpType = madmin.OpenidIDPCfg } - configBody := "enable=on" + configBody := "enable=" if !enable { configBody = "enable=off" }