From 13a91fcb908dc814a0eaae89b832c1c816409d8e Mon Sep 17 00:00:00 2001 From: Kittapath Date: Mon, 5 Aug 2024 14:34:27 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B8=8A=E0=B9=87=E0=B8=84=E0=B8=AA?= =?UTF-8?q?=E0=B8=B4=E0=B8=97=E0=B8=98=E0=B8=B4=E0=B9=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/PermissionController.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/controllers/PermissionController.ts b/src/controllers/PermissionController.ts index 64dfe557..b51b9e79 100644 --- a/src/controllers/PermissionController.ts +++ b/src/controllers/PermissionController.ts @@ -47,8 +47,14 @@ export class PermissionController extends Controller { } const posMaster = await this.posMasterRepository.findOne({ - select: ["authRoleId"], - where: { current_holderId: profile.id }, + // select: ["authRoleId"], + where: { + current_holderId: profile.id, + orgRevision: { + orgRevisionIsDraft: false, + orgRevisionIsCurrent: true, + }, + }, }); if (!posMaster) { throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลสิทธิ์");