diff --git a/app/Models/Server.php b/app/Models/Server.php index 0b987faad..e13cae2ff 100644 --- a/app/Models/Server.php +++ b/app/Models/Server.php @@ -121,7 +121,9 @@ class Server extends Model } /** - * Returns a single server specified by UUID + * Returns a single server specified by UUID. + * DO NOT USE THIS TO MODIFY SERVER DETAILS OR SAVE THOSE DETAILS. + * YOU WILL OVERWRITE THE SECRET KEY AND BREAK THINGS. * * @param string $uuid The Short-UUID of the server to return an object about. * @return \Illuminate\Database\Eloquent\Collection @@ -147,17 +149,6 @@ class Server extends Model $result->daemonSecret = self::getUserDaemonSecret($result); } - // Prevent saving of model called in this manner. - // Prevents accidental overwrite of main daemon secret. - $result::saving(function () { - return false; - }); - - // Prevent deleting this model call. - $result::deleting(function () { - return false; - }); - self::$serverUUIDInstance[$uuid] = $result; return self::$serverUUIDInstance[$uuid];