fix(employee): missing permission check

This commit is contained in:
Methapon Metanipat 2024-10-22 09:35:38 +07:00
parent d09ff6cff1
commit d2d9181493

View file

@ -739,7 +739,12 @@ export class EmployeeFileController extends Controller {
@Get("file-in-country-notice/{noticeId}")
@Security("keycloak")
@Tags("Employee In Country Notice")
async getNotice(@Path() employeeId: string, @Path() noticeId: string) {
async getNotice(
@Request() req: RequestWithUser,
@Path() employeeId: string,
@Path() noticeId: string,
) {
await this.checkPermission(req.user, employeeId);
return await getFile(fileLocation.employee.inCountryNotice(employeeId, noticeId));
}