เช็คสิทธิ์

This commit is contained in:
Kittapath 2024-08-05 14:34:27 +07:00
parent 19233f7b36
commit 13a91fcb90

View file

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