diff --git a/CHANGELOG.md b/CHANGELOG.md index 356f554328b..e8d1c7347d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,7 @@ have been removed. Use `morph.endpoints` for both instead. Deprecated `neofs_node_object_epoch` metric for IR and SN (the same for both) has been removed. Use `neofs_node_state_epoch` for SN and `neofs_ir_state_epoch` for IR instead. +Deprecated `--no-precheck` flag in `neofs-cli container set-eacl` use `--force` flag instead for skipping validation checks. Subnets support has been removed: - IR's `workers.subnet` and `contracts.subnet` configs are not used anymore. diff --git a/cmd/neofs-cli/modules/container/set_eacl.go b/cmd/neofs-cli/modules/container/set_eacl.go index 8aa5b42b54e..d373b4a8ce6 100644 --- a/cmd/neofs-cli/modules/container/set_eacl.go +++ b/cmd/neofs-cli/modules/container/set_eacl.go @@ -38,8 +38,8 @@ Container ID in EACL table will be substituted with ID from the CLI.`, pk := key.GetOrGenerate(cmd) cli := internalclient.GetSDKClientByFlag(ctx, cmd, commonflags.RPC) - - if !flagVarsSetEACL.noPreCheck { + force, _ := cmd.Flags().GetBool(commonflags.ForceFlag) + if !(force || flagVarsSetEACL.noPreCheck) { cmd.Println("Checking the ability to modify access rights in the container...") common.PrintVerbose(cmd, "Reading the container to check ownership...") @@ -144,5 +144,7 @@ func initContainerSetEACLCmd() { flags.StringVar(&flagVarsSetEACL.srcPath, "table", "", "path to file with JSON or binary encoded EACL table") flags.BoolVar(&containerAwait, "await", false, fmt.Sprintf("block execution until EACL is persisted. "+ "Increases default execution timeout to %.0fs", awaitTimeout.Seconds())) // simple %s notation prints 1m0s https://github.com/golang/go/issues/39064 + flags.BoolP(commonflags.ForceFlag, commonflags.ForceFlagShorthand, false, "skip validation checks (ownership, extensibility of the container ACL)") flags.BoolVar(&flagVarsSetEACL.noPreCheck, "no-precheck", false, "do not pre-check the extensibility of the container ACL") + _ = flags.MarkDeprecated("no-precheck", "use --force flag instead for skipping validation checks") }