mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-13 11:53:45 +02:00
Fix startup variable editing to allow admin full control
This commit is contained in:
@@ -540,7 +540,7 @@ class ServerRepository
|
||||
|
||||
}
|
||||
|
||||
public function updateStartup($id, array $data)
|
||||
public function updateStartup($id, array $data, $admin = false)
|
||||
{
|
||||
|
||||
$server = Models\Server::findOrFail($id);
|
||||
@@ -595,7 +595,7 @@ class ServerRepository
|
||||
}
|
||||
|
||||
// Variable hidden and/or not user editable
|
||||
if ($variable->user_viewable === 0 || $variable->user_editable === 0) {
|
||||
if (($variable->user_viewable === 0 || $variable->user_editable === 0) && !$admin) {
|
||||
throw new DisplayException('A service option variable field (' . $variable->env_variable . ') does not exist or you do not have permission to edit it.');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user