fix: also not include self if inactive

This commit is contained in:
Methapon2001 2024-12-10 17:14:44 +07:00
parent 23d9f0054c
commit 6250a84327

View file

@ -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,
},
];
}