Conditions | 1 |
Paths | 1 |
Total Lines | 9 |
Code Lines | 2 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | public function update(User $user, ApplicationReview $applicationReview) |
||
22 | { |
||
23 | $user->loadMissing('manager'); |
||
24 | // TODO: Is there business logic around who can update/create application reviews? |
||
25 | // Does it need to be the manager who created the Job Poster, or can it be any manager/HR advisor? |
||
26 | // $applicationReview->loadMissing('job_application.job_poster.manager'); |
||
27 | // return $user->isUpgradedManager() && |
||
28 | // $applicationReview->job_application->job_poster->manager->id === $user->manager->id; |
||
29 | return $user->isUpgradedManager(); |
||
30 | } |
||
32 |