From 0c79a92fc40e59d847375dc62ebae8d62f8990b8 Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Thu, 26 Dec 2024 10:00:40 +0700 Subject: [PATCH] fix: make permission check from quotation reg branch instead --- src/controllers/06-request-list-controller.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/controllers/06-request-list-controller.ts b/src/controllers/06-request-list-controller.ts index 77f2bbd..0f025a1 100644 --- a/src/controllers/06-request-list-controller.ts +++ b/src/controllers/06-request-list-controller.ts @@ -121,11 +121,7 @@ export class RequestDataController extends Controller { requestDataStatus, quotation: { id: quotationId, - customerBranch: { - customer: { - registeredBranch: { OR: permissionCond(req.user) }, - }, - }, + registeredBranch: { OR: permissionCond(req.user) }, }, } satisfies Prisma.RequestDataWhereInput;