From c3cca3486928df54f4fcbbb5849d21fdf9bb9887 Mon Sep 17 00:00:00 2001 From: Oleksandr Andriienko Date: Fri, 26 Jan 2024 15:20:16 +0200 Subject: [PATCH] fix(rbac): fix validation mistake Signed-off-by: Oleksandr Andriienko --- plugins/rbac-backend/src/service/policies-validation.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/rbac-backend/src/service/policies-validation.ts b/plugins/rbac-backend/src/service/policies-validation.ts index 9139b0c999..134ed12896 100644 --- a/plugins/rbac-backend/src/service/policies-validation.ts +++ b/plugins/rbac-backend/src/service/policies-validation.ts @@ -114,8 +114,8 @@ async function validateGroupingPolicy( roleMetadataStorage: RoleMetadataStorage, source: Source, ) { - if (groupPolicy.length === 3) { - throw new Error(`Group policy should has length 3`); + if (groupPolicy.length !== 2) { + throw new Error(`Group policy should has length 2`); } const member = groupPolicy[0];