From 2d8bfea71df0990bfbb33dec29a826a1d5fc573f Mon Sep 17 00:00:00 2001 From: Alberto Baroso Date: Sun, 21 Jan 2024 15:34:40 +0100 Subject: [PATCH] fix: check ability for update recruitment session --- api/src/recruitment-session/recruitment-session.controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/recruitment-session/recruitment-session.controller.ts b/api/src/recruitment-session/recruitment-session.controller.ts index 0cbbc05..96d56fb 100644 --- a/api/src/recruitment-session/recruitment-session.controller.ts +++ b/api/src/recruitment-session/recruitment-session.controller.ts @@ -118,11 +118,11 @@ export class RecruitmentSessionController { param: Joi.number().positive().integer().required().label('session_id'), body: updateRecruitmentSessionSchema, }) + @CheckPolicies((ability) => ability.can(Action.Update, 'RecruitmentSession')) async updateRecruitmentSession( @Param('session_id') sessionId: number, @Body() updateRecruitmentSession: UpdateRecruitmentSessionDto, @Ability() ability: AppAbility, - @Req() req: AuthenticatedRequest, // # TODO: USE THIS param? ): Promise { const recruitmentSession = await this.recruitmentSessionService.findRecruitmentSessionById(