Skip to content

Commit ac259c2

Browse files
authored
feat: fix bug in authz.service.ts: invalid request size: expected 3, got 1, rvals: (#176)
1 parent 0dd1600 commit ac259c2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/services/authz.service.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ export class AuthZService {
322322
* @return whether or not the request is allowed
323323
*/
324324
enforce(...params: any[]): Promise<boolean> {
325-
return authzAPI.enforce(this.enforcer, params);
325+
return authzAPI.enforce(this.enforcer, ...params);
326326
}
327327

328328
/**
@@ -334,7 +334,7 @@ export class AuthZService {
334334
* @return whether or not the request is allowed
335335
*/
336336
enforceWithMatcher(matcher: string, ...params: any[]): Promise<boolean> {
337-
return authzAPI.enforceWithMatcher(this.enforcer, matcher, params);
337+
return authzAPI.enforceWithMatcher(this.enforcer, matcher, ...params);
338338
}
339339

340340
/**
@@ -345,7 +345,7 @@ export class AuthZService {
345345
* @return whether or not the request is allowed, and what policy caused that decision
346346
*/
347347
enforceEx(...params: any[]): Promise<[boolean, string[]]> {
348-
return authzAPI.enforceEx(this.enforcer, params);
348+
return authzAPI.enforceEx(this.enforcer, ...params);
349349
}
350350

351351
/**
@@ -360,7 +360,7 @@ export class AuthZService {
360360
matcher: string,
361361
...params: any[]
362362
): Promise<[boolean, string[]]> {
363-
return authzAPI.enforceExWithMatcher(this.enforcer, matcher, params);
363+
return authzAPI.enforceExWithMatcher(this.enforcer, matcher, ...params);
364364
}
365365

366366
/**

0 commit comments

Comments
 (0)