From cf520021db2bd75ab7341dd27dcc3b096bf83aed Mon Sep 17 00:00:00 2001
From: Alex Petraky <petraky@perx.ru>
Date: Thu, 3 Apr 2025 14:05:05 +0000
Subject: [PATCH] =?UTF-8?q?fix:=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?=
 =?UTF-8?q?=D0=B5=D0=BD=20=D1=83=D1=87=D0=B5=D1=82=20=D1=84=D0=BB=D0=B0?=
 =?UTF-8?q?=D0=B3=D0=B0=20"=D0=A0=D0=B0=D1=81=D1=88=D0=B8=D1=80=D0=B5?=
 =?UTF-8?q?=D0=BD=D0=BD=D1=8B=D0=B9=20=D0=B4=D0=BE=D1=81=D1=82=D1=83=D0=BF?=
 =?UTF-8?q?"=20=D0=B4=D0=BB=D1=8F=20=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE?=
 =?UTF-8?q?=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D0=B5=D0=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 pkg/auth/user.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/pkg/auth/user.go b/pkg/auth/user.go
index 29e87945..933ec98b 100644
--- a/pkg/auth/user.go
+++ b/pkg/auth/user.go
@@ -309,6 +309,10 @@ func (u *UserPrincipal) Rules(ctx context.Context, spaceID, envID string) permis
 		return nil
 	}
 
+	if role.AllowManagement {
+		return permission.PrivilegedRuleset{}
+	}
+
 	if !hasEnvironmentAccess(ctx, u.environments, role, envID) {
 		return nil
 	}
-- 
GitLab