diff --git a/CHANGELOG.md b/CHANGELOG.md index 9cd81951c..bc82c566a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines. * Fixes a bug when reinstalling a server that would not mark the server as installing, resulting in some UI issues. * Handle 404 errors from missing models in the application API bindings correctly. * Fix validation error returned when no environment variables are passed, even if there are no variables required. +* Fix improper permissions on `PATCH /api/servers//startup` endpoint which was preventing enditing any start variables. ### Added * Adds back client API for sending commands or power toggles to a server though the Panel API: `/api/client/servers/` diff --git a/app/Http/Controllers/Api/Application/Servers/StartupController.php b/app/Http/Controllers/Api/Application/Servers/StartupController.php index e6b8015d8..0265af464 100644 --- a/app/Http/Controllers/Api/Application/Servers/StartupController.php +++ b/app/Http/Controllers/Api/Application/Servers/StartupController.php @@ -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))