Skip to content

Commit

Permalink
fix: config acl (#4522)
Browse files Browse the repository at this point in the history
Signed-off-by: jiefenghuang <[email protected]>
  • Loading branch information
jiefenghuang authored Mar 15, 2024
1 parent cc9997b commit 6db75cc
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,15 @@ func config(ctx *cli.Context) error {
clientVer = true
}
case "enable-acl":
// cannot disable
if ctx.Bool(flag) {
format.EnableACL = true
format.MinClientVersion = "1.2.0-A"
if enableACL := ctx.Bool(flag); enableACL != format.EnableACL {
if enableACL {
msg.WriteString(fmt.Sprintf("%s: %v -> %v\n", flag, format.EnableACL, true))
msg.WriteString(fmt.Sprintf("%s: %s -> %s\n", "min-client-version", format.MinClientVersion, "1.2.0-A"))
format.EnableACL = true
format.MinClientVersion = "1.2.0-A"
} else {
return errors.New("cannot disable acl")
}
}
}
}
Expand Down

0 comments on commit 6db75cc

Please sign in to comment.