Changeset View
Changeset View
Standalone View
Standalone View
src/app/Http/Controllers/API/V4/DomainsController.php
Show First 20 Lines • Show All 151 Lines • ▼ Show 20 Lines | class DomainsController extends Controller | ||||
* Fetch domain status (and reload setup process) | * Fetch domain status (and reload setup process) | ||||
* | * | ||||
* @param int $id Domain identifier | * @param int $id Domain identifier | ||||
* | * | ||||
* @return \Illuminate\Http\JsonResponse | * @return \Illuminate\Http\JsonResponse | ||||
*/ | */ | ||||
public function status($id) | public function status($id) | ||||
{ | { | ||||
$domain = Domain::find($id); | $domain = Domain::withEnvTenant()->findOrFail($id); | ||||
if (!$this->checkTenant($domain)) { | if (!$this->checkTenant($domain)) { | ||||
return $this->errorResponse(404); | return $this->errorResponse(404); | ||||
} | } | ||||
if (!$this->guard()->user()->canRead($domain)) { | if (!$this->guard()->user()->canRead($domain)) { | ||||
return $this->errorResponse(403); | return $this->errorResponse(403); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 221 Lines • Show Last 20 Lines |