Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
fix(report-abilities): get function is not exists
Browse files Browse the repository at this point in the history
  • Loading branch information
MitanOmar committed Apr 16, 2024
1 parent a632bb7 commit 4c46213
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/abilities/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ export default class ReportAbility extends Ability {
this.user?.isSuperuser ||
(!this.model?.verifiedBy?.get("id") &&
// eslint-disable-next-line ember/no-get
(this.model?.user?.get("id") === this.user?.get("id") ||
(this.model?.user?.get("id") === this.user?.id ||
// eslint-disable-next-line ember/no-get
(this.model?.user?.get("supervisors") ?? [])
.mapBy("id")
.includes(this.user?.get("id"))));
.includes(this.user?.id)));
const isReviewer =
(this.model?.taskAssignees ?? [])
.concat(
this.model?.projectAssignees ?? [],
this.model?.customerAssignees ?? []
)
.mapBy("user.id")
.includes(this.user?.get("id")) && !this.model?.verifiedBy?.get("id");
.includes(this.user?.id) && !this.model?.verifiedBy?.get("id");
return isEditable || isReviewer;
}
}

0 comments on commit 4c46213

Please sign in to comment.