From 3f5bc4a8859300e0255103e55bcf992755652be8 Mon Sep 17 00:00:00 2001 From: Dario Tranchitella Date: Sun, 25 Aug 2024 19:51:06 +0200 Subject: [PATCH] chore(style): golangci-lint required changes (#1173) Signed-off-by: Dario Tranchitella --- pkg/webhook/ownerreference/patching.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/webhook/ownerreference/patching.go b/pkg/webhook/ownerreference/patching.go index 8dde2816..8a7ac7cc 100644 --- a/pkg/webhook/ownerreference/patching.go +++ b/pkg/webhook/ownerreference/patching.go @@ -7,13 +7,13 @@ import ( "context" "encoding/json" "fmt" - "k8s.io/apimachinery/pkg/fields" "net/http" "sort" "strings" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/record" @@ -119,6 +119,7 @@ func (h *handler) namespaceIsOwned(ns *corev1.Namespace, tenantList *capsulev1be if !capsuleutils.IsTenantOwnerReference(ownerRef) { continue } + if ownerRef.UID == tenant.UID && utils.IsTenantOwner(tenant.Spec.Owners, req.UserInfo) { return true }