Skip to content

Commit 4f3ba65

Browse files
fix(rbac): fix defaultRoleManager hasRole method (#211)
In the current version, defaultRoleManager hasRole always returns true if a matchingFunc is provided. This PR fixes it. Signed-off-by: Alexey Yunoshev <alexey.yunoshev@gmail.com>
1 parent 3b8f4f3 commit 4f3ba65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rbac/defaultRoleManager.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class Roles extends Map<string, Role> {
9999
} else {
100100
return this.has(name);
101101
}
102-
return true;
102+
return ok;
103103
}
104104

105105
public createRole(name: string, matchingFunc?: MatchingFunc): Role {

0 commit comments

Comments
 (0)