parameter('server', Server::class); $route = $this->route(); throw_if($route === null, UnexpectedValueException::class, 'The backup request does not have an active route.'); $backup = $route->parameter('backup'); if ($backup instanceof Backup) { throw_if($backup->server_id !== $server->id, NotFoundHttpException::class, 'The requested resource does not exist on the system.'); } return true; } public function permission(): string { return Permissions::BackupRead->value; } }