mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-31 09:02:41 +01:00
DreamDaemonController fixes
This commit is contained in:
@@ -104,14 +104,14 @@ namespace Tgstation.Server.Host.Controllers
|
||||
var llp = dd.LastLaunchParameters;
|
||||
var rstate = dd.RebootState;
|
||||
result.AutoStart = settings.AutoStart;
|
||||
result.CurrentPort = alphaActive ? llp.PrimaryPort : llp.SecondaryPort;
|
||||
result.CurrentSecurity = llp.SecurityLevel;
|
||||
result.CurrentAllowWebclient = llp.AllowWebClient;
|
||||
result.PrimaryPort = dd.ActiveLaunchParameters.PrimaryPort;
|
||||
result.AllowWebClient = dd.ActiveLaunchParameters.AllowWebClient;
|
||||
result.CurrentPort = alphaActive ? llp?.PrimaryPort : llp?.SecondaryPort;
|
||||
result.CurrentSecurity = llp?.SecurityLevel;
|
||||
result.CurrentAllowWebclient = llp?.AllowWebClient;
|
||||
result.PrimaryPort = settings.PrimaryPort;
|
||||
result.AllowWebClient = settings.AllowWebClient;
|
||||
result.Running = dd.Running;
|
||||
result.SecondaryPort = llp.SecondaryPort;
|
||||
result.SecurityLevel = llp.SecurityLevel;
|
||||
result.SecondaryPort = settings.SecondaryPort;
|
||||
result.SecurityLevel = settings.SecurityLevel;
|
||||
result.SoftRestart = rstate == RebootState.Restart;
|
||||
result.SoftShutdown = rstate == RebootState.Shutdown;
|
||||
};
|
||||
@@ -167,14 +167,14 @@ namespace Tgstation.Server.Host.Controllers
|
||||
var oldSoftRestart = current.SoftRestart;
|
||||
var oldSoftShutdown = current.SoftShutdown;
|
||||
|
||||
if (!CheckModified(x => x.AllowWebClient, DreamDaemonRights.SetWebClient)
|
||||
|| !CheckModified(x => x.AutoStart, DreamDaemonRights.SetAutoStart)
|
||||
|| !CheckModified(x => x.PrimaryPort, DreamDaemonRights.SetPorts)
|
||||
|| !CheckModified(x => x.SecondaryPort, DreamDaemonRights.SetPorts)
|
||||
|| !CheckModified(x => x.SecurityLevel, DreamDaemonRights.SetSecurity)
|
||||
|| !CheckModified(x => x.SoftRestart, DreamDaemonRights.SoftRestart)
|
||||
|| !CheckModified(x => x.SoftShutdown, DreamDaemonRights.SoftShutdown)
|
||||
|| !CheckModified(x => x.StartupTimeout, DreamDaemonRights.SetStartupTimeout))
|
||||
if (CheckModified(x => x.AllowWebClient, DreamDaemonRights.SetWebClient)
|
||||
|| CheckModified(x => x.AutoStart, DreamDaemonRights.SetAutoStart)
|
||||
|| CheckModified(x => x.PrimaryPort, DreamDaemonRights.SetPorts)
|
||||
|| CheckModified(x => x.SecondaryPort, DreamDaemonRights.SetPorts)
|
||||
|| CheckModified(x => x.SecurityLevel, DreamDaemonRights.SetSecurity)
|
||||
|| CheckModified(x => x.SoftRestart, DreamDaemonRights.SoftRestart)
|
||||
|| CheckModified(x => x.SoftShutdown, DreamDaemonRights.SoftShutdown)
|
||||
|| CheckModified(x => x.StartupTimeout, DreamDaemonRights.SetStartupTimeout))
|
||||
return Forbid();
|
||||
|
||||
if (current.SecurityLevel == DreamDaemonSecurity.Ultrasafe)
|
||||
|
||||
Reference in New Issue
Block a user