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, "ไม่พบข้อมูลสิทธิ์");