Skip to content

Commit

Permalink
rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
despadam committed Aug 8, 2024
1 parent aabe451 commit 4aedbc2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/jobs/jobs.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -737,10 +737,10 @@ export class JobsController {
const ability = this.caslAbilityFactory.createForUser(
request.user as JWTUser,
);
const canGet =
const canRead =
ability.can(AuthOp.JobReadAny, JobClass) ||
ability.can(AuthOp.JobReadAccess, currentJobInstance);
if (!canGet) {
if (!canRead) {
throw new ForbiddenException("Unauthorized to get this job.");
}
return currentJob;
Expand Down

0 comments on commit 4aedbc2

Please sign in to comment.