From 60ff409f1c3c452bbd909058b23df7054d513d1b Mon Sep 17 00:00:00 2001 From: Andrii Korotkov Date: Wed, 17 Sep 2025 23:33:30 -0700 Subject: [PATCH] fix: Update checkPermissions to not exit the namespace loop after the first namespace regardless Signed-off-by: Andrii Korotkov --- pkg/cache/cluster.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/cache/cluster.go b/pkg/cache/cluster.go index 38f1e6016..2b2a7b5c8 100644 --- a/pkg/cache/cluster.go +++ b/pkg/cache/cluster.go @@ -845,10 +845,9 @@ func (c *clusterCache) checkPermission(ctx context.Context, reviewInterface auth if resp != nil && resp.Status.Allowed { return true, nil } - // unsupported, remove from watch list - //nolint:staticcheck //FIXME - return false, nil } + // unsupported, remove from watch list + return false, nil } // checkPermission follows the same logic of determining namespace/cluster resource as the processApi function // so if neither of the cases match it means the controller will not watch for it so it is safe to return true.