diff --git a/container/acl/acl_basic.go b/container/acl/acl_basic.go index f45ff012..5a27db19 100644 --- a/container/acl/acl_basic.go +++ b/container/acl/acl_basic.go @@ -68,7 +68,7 @@ func (x *Basic) DisableExtension() { // Extendable checks if Basic is NOT made FINAL using DisableExtension. // -// Zero Basic is NOT FINAL or extendable. +// Zero Basic is extendable. func (x Basic) Extendable() bool { return !isBitSet(x.bits, bitPosFinal) } @@ -90,8 +90,9 @@ func (x Basic) Sticky() bool { // checks if op is used by the storage nodes within replication mechanism. func isReplicationOp(op Op) bool { - //nolint:exhaustive switch op { + default: + return false case OpObjectGet, OpObjectHead, @@ -100,8 +101,6 @@ func isReplicationOp(op Op) bool { OpObjectHash: return true } - - return false } // AllowOp allows the parties with the given role to the given operation. @@ -195,8 +194,7 @@ func (x Basic) IsOpAllowed(op Op, role Role) bool { } // AllowBearerRules allows bearer to provide extended ACL rules for the given -// operation. Bearer rules doesn't depend on container ACL -// // extensibility. +// operation. Bearer rules doesn't depend on container ACL extensibility. // // See also AllowedBearerRules. func (x *Basic) AllowBearerRules(op Op) { diff --git a/container/test/generate.go b/container/test/generate.go index 036a65f8..8bd7a58a 100644 --- a/container/test/generate.go +++ b/container/test/generate.go @@ -1,6 +1,8 @@ package containertest import ( + "math/rand" + "github.com/nspcc-dev/neofs-sdk-go/container" "github.com/nspcc-dev/neofs-sdk-go/container/acl" cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" @@ -52,6 +54,6 @@ func UsedSpaceAnnouncement() *container.UsedSpaceAnnouncement { // BasicACL returns random acl.Basic. func BasicACL() (x acl.Basic) { - x.FromBits(0xffffffff) + x.FromBits(rand.Uint32()) return }