| @@ 103-112 (lines=10) @@ | ||
| 100 | * |
|
| 101 | * @return bool |
|
| 102 | */ |
|
| 103 | protected function suspended() |
|
| 104 | { |
|
| 105 | if ($this->server->suspended) { |
|
| 106 | if ($this->request->expectsJson() || $this->request->is(...config('pterodactyl.json_routes'))) { |
|
| 107 | throw new AccessDeniedHttpException('Server is suspended.'); |
|
| 108 | } |
|
| 109 | } |
|
| 110 | ||
| 111 | return $this->server->suspended; |
|
| 112 | } |
|
| 113 | ||
| 114 | /** |
|
| 115 | * Determine if the server is installed. |
|
| @@ 119-128 (lines=10) @@ | ||
| 116 | * |
|
| 117 | * @return bool |
|
| 118 | */ |
|
| 119 | protected function installed() |
|
| 120 | { |
|
| 121 | if ($this->server->installed !== 1) { |
|
| 122 | if ($this->request->expectsJson() || $this->request->is(...config('pterodactyl.json_routes'))) { |
|
| 123 | throw new AccessDeniedHttpException('Server is completing install process.'); |
|
| 124 | } |
|
| 125 | } |
|
| 126 | ||
| 127 | return $this->server->installed === 1; |
|
| 128 | } |
|
| 129 | } |
|
| 130 | ||