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

Commit

Permalink
refactor(abilities/page): simplify canAccess
Browse files Browse the repository at this point in the history
  • Loading branch information
c0rydoras committed Apr 10, 2024
1 parent bdd1df6 commit c0314ca
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/abilities/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ export default class PageAbility extends Ability {
if (!this.user) {
return false;
}
return (
!this.user.activeEmployment?.isExternal ||
(this.user.activeEmployment?.isExternal && this.user.isReviewer)
);

return !this.user.activeEmployment?.isExternal || this.user.isReviewer;
}
}

0 comments on commit c0314ca

Please sign in to comment.