diff --git a/src/services/permission.ts b/src/services/permission.ts index 6bf3d60..8df8f99 100644 --- a/src/services/permission.ts +++ b/src/services/permission.ts @@ -61,6 +61,7 @@ export function createPermCondition( }, } : undefined, + status: opts?.activeOnly ? { not: Status.INACTIVE } : undefined, }, { headOffice: globalAllow(user) @@ -69,6 +70,7 @@ export function createPermCondition( user: { some: { userId: user.sub } }, } : undefined, + status: opts?.activeOnly ? { not: Status.INACTIVE } : undefined, }, ]; }