From 33143b18a98a02915aed998761cd0962dce6bddc Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Fri, 2 Sep 2022 11:57:23 +0400 Subject: [PATCH] [#1652] cli/container: Invert pre-check flag of `set-eacl` command Flag `--pre-check` of `set-eacl` command found to be in demand in most cases. based on this, it makes sense to add its action to the default behavior. Pre-check container extensibility by default. Rename flag to `--no-precheck` and invert its action. Signed-off-by: Leonard Lyubich --- cmd/neofs-cli/modules/container/set_eacl.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/neofs-cli/modules/container/set_eacl.go b/cmd/neofs-cli/modules/container/set_eacl.go index 0558078fce..4d7b3b6ef1 100644 --- a/cmd/neofs-cli/modules/container/set_eacl.go +++ b/cmd/neofs-cli/modules/container/set_eacl.go @@ -14,7 +14,7 @@ import ( ) var flagVarsSetEACL struct { - preCheck bool + noPreCheck bool srcPath string } @@ -41,7 +41,7 @@ Container ID in EACL table will be substituted with ID from the CLI.`, pk := key.GetOrGenerate(cmd) cli := internalclient.GetSDKClientByFlag(cmd, pk, commonflags.RPC) - if flagVarsSetEACL.preCheck { + if !flagVarsSetEACL.noPreCheck { cmd.Println("Checking the ability to modify access rights in the container...") extendable, err := internalclient.IsACLExtendable(cli, id) @@ -106,5 +106,5 @@ func initContainerSetEACLCmd() { flags.StringVar(&containerID, "cid", "", "container ID") flags.StringVar(&flagVarsSetEACL.srcPath, "table", "", "path to file with JSON or binary encoded EACL table") flags.BoolVar(&containerAwait, "await", false, "block execution until EACL is persisted") - flags.BoolVar(&flagVarsSetEACL.preCheck, "precheck", false, "pre-check the extensibility of the container ACL") + flags.BoolVar(&flagVarsSetEACL.noPreCheck, "no-precheck", false, "do not pre-check the extensibility of the container ACL") }