[#1689] linter: Fix staticcheck warning: 'could use tagged switch on *'
Some checks failed
Vulncheck / Vulncheck (push) Successful in 1m14s
Pre-commit hooks / Pre-commit (push) Successful in 1m39s
Build / Build Components (push) Successful in 1m52s
Tests and linters / gopls check (push) Successful in 3m50s
Tests and linters / Run gofumpt (push) Successful in 3m56s
Tests and linters / Staticcheck (push) Successful in 4m30s
Tests and linters / Lint (push) Successful in 4m38s
Tests and linters / Tests (push) Successful in 4m46s
OCI image / Build container images (push) Successful in 4m59s
Tests and linters / Tests with -race (push) Has been cancelled

Change-Id: Ia340ce1ccdd223eb87f7aefabfba62b7055f344d
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
This commit is contained in:
Alexander Chuprov 2025-04-08 15:22:00 +03:00
parent 4f9d237042
commit fe29ed043a
Signed by: achuprov
GPG key ID: 2D916FFD803B0EDD

View file

@ -76,9 +76,10 @@ var errMissingOID = errors.New("object ID is not set")
// CheckAPE prepares an APE-request and checks if it is permitted by policies.
func (c *checkerImpl) CheckAPE(ctx context.Context, prm Prm) error {
// APE check is ignored for some inter-node requests.
if prm.Role == nativeschema.PropertyValueContainerRoleContainer {
switch prm.Role {
case nativeschema.PropertyValueContainerRoleContainer:
return nil
} else if prm.Role == nativeschema.PropertyValueContainerRoleIR {
case nativeschema.PropertyValueContainerRoleIR:
switch prm.Method {
case nativeschema.MethodGetObject,
nativeschema.MethodHeadObject,