Fix inability to edit certain environment vars and start line, closes #1008

This commit is contained in:
Dane Everitt 2018-03-01 19:26:11 -06:00
parent 85bdbdce14
commit 070239abcf
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
2 changed files with 5 additions and 1 deletions

View file

@ -2,6 +2,7 @@
namespace Pterodactyl\Http\Controllers\Api\Application\Servers;
use Pterodactyl\Models\User;
use Pterodactyl\Models\Server;
use Pterodactyl\Services\Servers\StartupModificationService;
use Pterodactyl\Transformers\Api\Application\ServerTransformer;
@ -40,7 +41,9 @@ class StartupController extends ApplicationApiController
*/
public function index(UpdateServerStartupRequest $request): array
{
$server = $this->modificationService->handle($request->getModel(Server::class), $request->validated());
$server = $this->modificationService
->setUserLevel(User::USER_LEVEL_ADMIN)
->handle($request->getModel(Server::class), $request->validated());
return $this->fractal->item($server)
->transformWith($this->getTransformer(ServerTransformer::class))