Fix inability to edit certain environment vars and start line, closes #1008
This commit is contained in:
parent
85bdbdce14
commit
070239abcf
2 changed files with 5 additions and 1 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue