From dbdcd59ef2276adb6554bda3e976e8b3e9d3a538 Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Wed, 16 Oct 2024 16:53:10 +0200 Subject: [PATCH] fix check if role descriptors are defined --- .../services/saml_auth/saml_auth_provider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kbn-ftr-common-functional-services/services/saml_auth/saml_auth_provider.ts b/packages/kbn-ftr-common-functional-services/services/saml_auth/saml_auth_provider.ts index 50aed19db56ceb..2a2759bb3e9834 100644 --- a/packages/kbn-ftr-common-functional-services/services/saml_auth/saml_auth_provider.ts +++ b/packages/kbn-ftr-common-functional-services/services/saml_auth/saml_auth_provider.ts @@ -33,7 +33,7 @@ export interface KibanaRoleDescriptors { } const throwIfRoleNotSet = (role: string, customRole: string, roleDescriptors: Map) => { - if (role === customRole && !roleDescriptors.has(customRole)) { + if (role === customRole && !roleDescriptors.get(customRole)) { throw new Error( `Set privileges for '${customRole}' using 'samlAuth.setCustomRole' before authentication.` );