scope
This commit is contained in:
parent
546f3330b2
commit
0762463eae
3 changed files with 42 additions and 43 deletions
|
|
@ -994,7 +994,7 @@ export class ProfileController extends Controller {
|
|||
*/
|
||||
@Get("commander/{profileId}")
|
||||
async getProfileCommanderUser(@Request() request: RequestWithUser, @Path() profileId: string) {
|
||||
await new permission().PermissionOrgUserGet(request, "SYS_REGISTRY_OFFICER", profileId);
|
||||
// await new permission().PermissionOrgUserGet(request, "SYS_REGISTRY_OFFICER", profileId);//ไม่แน่ใจOFFปิดไว้ก่อน
|
||||
const profile = await this.profileRepo.findOne({
|
||||
where: { id: profileId },
|
||||
});
|
||||
|
|
@ -2503,7 +2503,7 @@ export class ProfileController extends Controller {
|
|||
|
||||
@Get("history/{id}")
|
||||
async getProfileHistory(@Path() id: string, @Request() req: RequestWithUser) {
|
||||
await new permission().PermissionOrgUserList(req, "SYS_REGISTRY_OFFICER", id);
|
||||
// await new permission().PermissionOrgUserList(req, "SYS_REGISTRY_OFFICER", id);//ไม่แน่ใจOFFปิดไว้ก่อน
|
||||
const profile = await this.profileHistoryRepo.find({
|
||||
relations: {
|
||||
posLevel: true,
|
||||
|
|
@ -3160,7 +3160,7 @@ export class ProfileController extends Controller {
|
|||
*/
|
||||
@Get("profileid/position/{id}")
|
||||
async getProfileByProfileid(@Request() request: RequestWithUser, @Path() id: string) {
|
||||
await new permission().PermissionOrgUserGet(request, "SYS_REGISTRY_OFFICER", id);
|
||||
// await new permission().PermissionOrgUserGet(request, "SYS_REGISTRY_OFFICER", id);//ไม่แน่ใจOFFปิดไว้ก่อน
|
||||
const profile = await this.profileRepo.findOne({
|
||||
where: { id: id },
|
||||
relations: ["posLevel", "posType", "current_holders", "current_holders.orgRoot"],
|
||||
|
|
@ -3381,7 +3381,7 @@ export class ProfileController extends Controller {
|
|||
if (!profile) {
|
||||
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลบุคคลนี้ในระบบ");
|
||||
}
|
||||
await new permission().PermissionOrgUserList(request, "SYS_REGISTRY_OFFICER", profile.id);
|
||||
// await new permission().PermissionOrgUserList(request, "SYS_REGISTRY_OFFICER", profile.id);//ไม่แน่ใจOFFปิดไว้ก่อน
|
||||
return new HttpSuccess(profile);
|
||||
}
|
||||
|
||||
|
|
@ -3401,7 +3401,7 @@ export class ProfileController extends Controller {
|
|||
if (!profile) {
|
||||
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลบุคคลนี้ในระบบ");
|
||||
}
|
||||
await new permission().PermissionOrgUserList(request, "SYS_REGISTRY_OFFICER", profile.id);
|
||||
// await new permission().PermissionOrgUserList(request, "SYS_REGISTRY_OFFICER", profile.id);//ไม่แน่ใจOFFปิดไว้ก่อน
|
||||
|
||||
const orgRevisionPublish = await this.orgRevisionRepo
|
||||
.createQueryBuilder("orgRevision")
|
||||
|
|
@ -3516,7 +3516,7 @@ export class ProfileController extends Controller {
|
|||
*/
|
||||
@Get("profileempid/position/{id}")
|
||||
async getProfileByProfileempid(@Request() request: RequestWithUser, @Path() id: string) {
|
||||
await new permission().PermissionOrgUserList(request, "SYS_REGISTRY_OFFICER", id);
|
||||
// await new permission().PermissionOrgUserList(request, "SYS_REGISTRY_OFFICER", id);//ไม่แน่ใจOFFปิดไว้ก่อน
|
||||
const profile = await this.profileEmpRepo.findOne({
|
||||
where: { id: id },
|
||||
relations: ["posLevel", "posType", "current_holders", "current_holders.orgRoot"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue