fix(console): user grant read check (#681)

* fix: user grant read check

* fix guard

* rm console.logs
This commit is contained in:
Max Peintner
2020-09-01 16:23:24 +02:00
committed by GitHub
parent 0dd49f7430
commit 0d44b69c0e
6 changed files with 8 additions and 8 deletions
@@ -141,7 +141,7 @@ export class GrpcAuthService {
public hasRoles(userRoles: string[], requestedRoles: string[] | RegExp[]): boolean {
return requestedRoles.findIndex((regexp: any) => {
return userRoles.findIndex(role => {
return (new RegExp(regexp)).test(role);
return new RegExp(regexp).test(role);
}) > -1;
}) > -1;
}