Skip to content

Commit

Permalink
fix check if role descriptors are defined
Browse files Browse the repository at this point in the history
  • Loading branch information
dmlemeshko committed Oct 16, 2024
1 parent 072f0dc commit dbdcd59
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface KibanaRoleDescriptors {
}

const throwIfRoleNotSet = (role: string, customRole: string, roleDescriptors: Map<string, any>) => {
if (role === customRole && !roleDescriptors.has(customRole)) {
if (role === customRole && !roleDescriptors.get(customRole)) {
throw new Error(
`Set privileges for '${customRole}' using 'samlAuth.setCustomRole' before authentication.`
);
Expand Down

0 comments on commit dbdcd59

Please sign in to comment.