add
This commit is contained in:
parent
3499231119
commit
d6fa969d1f
|
@ -352,7 +352,9 @@ export class TermService extends BaseTreeService<Prisma.TermDelegate> {
|
||||||
staff: UserProfile,
|
staff: UserProfile,
|
||||||
data: z.infer<typeof TermMethodSchema.getSimpleTree>,
|
data: z.infer<typeof TermMethodSchema.getSimpleTree>,
|
||||||
) {
|
) {
|
||||||
const { domainId = null, permissions } = staff;
|
// const { domainId = null, permissions } = staff;
|
||||||
|
const permissions = staff?.permissions || [];
|
||||||
|
const domainId = staff?.domainId || null;
|
||||||
const hasAnyPerms =
|
const hasAnyPerms =
|
||||||
permissions.includes(RolePerms.READ_ANY_TERM) ||
|
permissions.includes(RolePerms.READ_ANY_TERM) ||
|
||||||
permissions.includes(RolePerms.MANAGE_ANY_TERM);
|
permissions.includes(RolePerms.MANAGE_ANY_TERM);
|
||||||
|
|
Loading…
Reference in New Issue