Skip to content

Commit

Permalink
fix: also allow 1 and 0 for projections
Browse files Browse the repository at this point in the history
  • Loading branch information
tibohei committed Oct 31, 2023
1 parent 1d84c7a commit 6ca1d8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rbac.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ export class RBAC<Params extends Record<string, any>, Role extends string> {
export type Filter = Record<string, any>

/** allows to remove or add fields from db document */
export type Projection = Record<string, boolean>
export type Projection = Record<string, boolean | 1 | 0>

export interface ConditionEvaluator<Params extends Record<string, any>> {
(params: Partial<Params>): Promise<boolean>
Expand Down

0 comments on commit 6ca1d8d

Please sign in to comment.