ปิดสิทธิ์ history ทะเบียนประวัตื (ชน USER)

This commit is contained in:
AdisakKanthawilang 2024-09-02 11:03:54 +07:00
parent 6d36c9b05f
commit 61176e0595
6 changed files with 30 additions and 30 deletions

View file

@ -123,12 +123,12 @@ export class ProfileAbilityController extends Controller {
@Path() abilityId: string,
@Request() req: RequestWithUser,
) {
const _record = await this.profileAbilityRepo.findOne({
where: { id: abilityId },
});
if (_record) {
await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
}
// const _record = await this.profileAbilityRepo.findOne({
// where: { id: abilityId },
// });
// if (_record) {
// await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
// }
const record = await this.profileAbilityHistoryRepo.find({
relations: ["histories"],
where: { profileAbilityId: abilityId },