fix: also not include self if inactive
This commit is contained in:
parent
23d9f0054c
commit
6250a84327
1 changed files with 2 additions and 0 deletions
|
|
@ -61,6 +61,7 @@ export function createPermCondition(
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
|
status: opts?.activeOnly ? { not: Status.INACTIVE } : undefined,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
headOffice: globalAllow(user)
|
headOffice: globalAllow(user)
|
||||||
|
|
@ -69,6 +70,7 @@ export function createPermCondition(
|
||||||
user: { some: { userId: user.sub } },
|
user: { some: { userId: user.sub } },
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
|
status: opts?.activeOnly ? { not: Status.INACTIVE } : undefined,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue