Add EULA acceptance popup when starting server

This commit is contained in:
Dane Everitt 2016-01-08 19:54:06 -05:00
parent 4b40fa65d4
commit 2160613163
7 changed files with 80 additions and 10 deletions

View file

@ -112,7 +112,9 @@ class Server extends Model
return self::$serverUUIDInstance[$uuid];
}
$query = self::where('uuidShort', $uuid)->where('active', 1);
$query = self::select('servers.*', 'services.file as a_serviceFile')
->join('services', 'services.id', '=', 'servers.id')
->where('uuidShort', $uuid)->where('active', 1);
if (self::$user->root_admin !== 1) {
$query->whereIn('servers.id', Subuser::accessServers());
@ -120,6 +122,9 @@ class Server extends Model
$result = $query->first();
// @TODO: saving after calling this could end up resetting the daemon secret.
// We probably need to just allow access to self::getUserDaemonSecret() to
// get this result.
if(!is_null($result)) {
$result->daemonSecret = self::getUserDaemonSecret($result);
}