File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
app/Http/Controllers/Api/Application/Servers Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
88* Fixes a bug when reinstalling a server that would not mark the server as installing, resulting in some UI issues.
99* Handle 404 errors from missing models in the application API bindings correctly.
1010* Fix validation error returned when no environment variables are passed, even if there are no variables required.
11+ * Fix improper permissions on ` PATCH /api/servers/<id>/startup ` endpoint which was preventing enditing any start variables.
1112
1213### Added
1314* Adds back client API for sending commands or power toggles to a server though the Panel API: ` /api/client/servers/<identifier> `
Original file line number Diff line number Diff line change 22
33namespace Pterodactyl \Http \Controllers \Api \Application \Servers ;
44
5+ use Pterodactyl \Models \User ;
56use Pterodactyl \Models \Server ;
67use Pterodactyl \Services \Servers \StartupModificationService ;
78use Pterodactyl \Transformers \Api \Application \ServerTransformer ;
@@ -40,7 +41,9 @@ public function __construct(StartupModificationService $modificationService)
4041 */
4142 public function index (UpdateServerStartupRequest $ request ): array
4243 {
43- $ server = $ this ->modificationService ->handle ($ request ->getModel (Server::class), $ request ->validated ());
44+ $ server = $ this ->modificationService
45+ ->setUserLevel (User::USER_LEVEL_ADMIN )
46+ ->handle ($ request ->getModel (Server::class), $ request ->validated ());
4447
4548 return $ this ->fractal ->item ($ server )
4649 ->transformWith ($ this ->getTransformer (ServerTransformer::class))
You can’t perform that action at this time.
0 commit comments