Completed
Pull Request — master (#681)
by Sean
06:33
created
code/control/EnvironmentOverview.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -70,12 +70,12 @@
 block discarded – undo
70 70
 	public function getModel($name = '') {
71 71
 		$base = Director::absoluteBaseURL();
72 72
 		return [
73
-			'basename' => Director::baseURL() . $this->getCurrentEnvironment()->Link('overview'),
73
+			'basename' => Director::baseURL().$this->getCurrentEnvironment()->Link('overview'),
74 74
 			'dispatchers' => [
75
-				'git' => $base . $this->getCurrentProject()->Link('git'),
76
-				'plan' => $base . $this->getCurrentEnvironment()->Link('plan'),
77
-				'deploys' => $base . $this->getCurrentEnvironment()->Link('deploys'),
78
-				'approvals' => $base . $this->getCurrentEnvironment()->Link('approvals')
75
+				'git' => $base.$this->getCurrentProject()->Link('git'),
76
+				'plan' => $base.$this->getCurrentEnvironment()->Link('plan'),
77
+				'deploys' => $base.$this->getCurrentEnvironment()->Link('deploys'),
78
+				'approvals' => $base.$this->getCurrentEnvironment()->Link('approvals')
79 79
 			],
80 80
 			'api_auth' => [
81 81
 				'name' => $this->getSecurityToken()->getName(),
Please login to merge, or discard this patch.
code/control/ApprovalsDispatcher.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -172,9 +172,11 @@
 block discarded – undo
172 172
 			return $errorResponse;
173 173
 		}
174 174
 
175
-		if (!$this->project->allowed(self::ALLOW_APPROVAL, Member::currentUser))) {
175
+		if (!$this->project->allowed(self::ALLOW_APPROVAL, Member::currentUser)) {
176
+			) {
176 177
 			return $this->getAPIResponse(['message' => 'You are not authorised to approve this deployment'], 403);
177 178
 		}
179
+		}
178 180
 
179 181
 		try {
180 182
 			$deployment->getMachine()->apply(DNDeployment::TR_APPROVE);
Please login to merge, or discard this patch.