@@ 196-198 (lines=3) @@ | ||
193 | // check for specific permission depending on the current state of the deployment: |
|
194 | // submitted => approved requires approval permissions |
|
195 | // new => approved requires bypass permissions. |
|
196 | if ($deployment->State === \DNDeployment::STATE_SUBMITTED && !$canApprove) { |
|
197 | return $this->getAPIResponse(['message' => 'You are not authorised to approve this deployment'], 403); |
|
198 | } |
|
199 | if ($deployment->State === \DNDeployment::STATE_NEW && !$canBypass) { |
|
200 | return $this->getAPIResponse(['message' => 'You are not authorised to bypass approval of this deployment'], 403); |
|
201 | } |
|
@@ 199-201 (lines=3) @@ | ||
196 | if ($deployment->State === \DNDeployment::STATE_SUBMITTED && !$canApprove) { |
|
197 | return $this->getAPIResponse(['message' => 'You are not authorised to approve this deployment'], 403); |
|
198 | } |
|
199 | if ($deployment->State === \DNDeployment::STATE_NEW && !$canBypass) { |
|
200 | return $this->getAPIResponse(['message' => 'You are not authorised to bypass approval of this deployment'], 403); |
|
201 | } |
|
202 | ||
203 | if ($deployment->State === \DNDeployment::STATE_NEW) { |
|
204 | // Bypassing approval: Ensure that approver is not set. This may happen when someone has requested approval, |