| @@ 107-111 (lines=5) @@ | ||
| 104 | } |
|
| 105 | ||
| 106 | $approver = Member::get()->byId($request->postVar('approver_id')); |
|
| 107 | if ($approver && $approver->exists()) { |
|
| 108 | if (!$this->project->allowed(ApprovalsDispatcher::ALLOW_APPROVAL, $approver)) { |
|
| 109 | return $this->getAPIResponse(['message' => 'The given approver does not have permissions to approve'], 403); |
|
| 110 | } |
|
| 111 | } |
|
| 112 | ||
| 113 | try { |
|
| 114 | if ($approver && $approver->exists()) { |
|
| @@ 177-181 (lines=5) @@ | ||
| 174 | $strategy->fromArray($request->postVars()); |
|
| 175 | ||
| 176 | $approver = Member::get()->byId($request->postVar('approver_id')); |
|
| 177 | if ($approver && $approver->exists()) { |
|
| 178 | if (!$this->project->allowed(ApprovalsDispatcher::ALLOW_APPROVAL, $approver)) { |
|
| 179 | return $this->getAPIResponse(['message' => 'The given approver does not have permissions to approve'], 403); |
|
| 180 | } |
|
| 181 | } |
|
| 182 | ||
| 183 | $deployment = $strategy->createDeployment(); |
|
| 184 | if ($approver && $approver->exists()) { |
|