Skip to content

Commit

Permalink
neofs-cli: container set-eacl removal of the no-precheck flag
Browse files Browse the repository at this point in the history
Remove the "no-precheck" flag, which is equivalent to "force" (skips
verification) and has been deprecated since #2490.

Closes: #2496.

Signed-off-by: Ekaterina Pavlova <[email protected]>
  • Loading branch information
AliceInHunterland committed Oct 2, 2023
1 parent 413a6d2 commit 77dc5f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Changelog for NeoFS Node
- FSTree storage now uses more efficient and safe temporary files under Linux (#2566)

### Removed
- `neofs-cli container set-eacl` removal of the `no-precheck` flag (#2496)

### Updated
- Update minimal supported Go version up to v1.19 (#2485)
Expand Down
6 changes: 1 addition & 5 deletions cmd/neofs-cli/modules/container/set_eacl.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import (
)

var flagVarsSetEACL struct {
noPreCheck bool

srcPath string
}

Expand All @@ -41,7 +39,7 @@ Container ID in EACL table will be substituted with ID from the CLI.`,
pk := key.GetOrGenerate(cmd)
cli := internalclient.GetSDKClientByFlag(ctx, cmd, commonflags.RPC)
force, _ := cmd.Flags().GetBool(commonflags.ForceFlag)
if !(force || flagVarsSetEACL.noPreCheck) {
if !force {
common.PrintVerbose(cmd, "Validating eACL table...")
err := util.ValidateEACLTable(eaclTable)
common.ExitOnErr(cmd, "table validation: %w", err)
Expand Down Expand Up @@ -151,6 +149,4 @@ func initContainerSetEACLCmd() {
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")
}

0 comments on commit 77dc5f3

Please sign in to comment.