]> _ Git - fluidbook-toolbox.git/commitdiff
wip #7567 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 2 Jun 2025 11:55:58 +0000 (13:55 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 2 Jun 2025 11:55:58 +0000 (13:55 +0200)
app/Models/FluidbookExternalInstallServer.php

index 67f18560c36e86cff007c1cb0ecdc4e5a1e32d97..6d9144bc4778111a17e27ff5ca516cd4b87f4ebd 100644 (file)
@@ -194,11 +194,12 @@ class FluidbookExternalInstallServer extends ExternalServer
     public static function verifyServerConnexion(array $data)
     {
         $isHosting = static::isHostingProtocol($data['protocol']);
+        $noRequired = $isHosting || in_array($data['protocol'], ['S3', 'GCS']);
 
         $validation = [
-            'password' => $isHosting ? 'nullable' : 'required|string|min:8',
-            'username' => $isHosting ? 'nullable' : 'required|string|max:255',
-            'host' => $isHosting ? 'nullable' : 'required|string|max:255',
+            'password' => $noRequired ? 'nullable' : 'required|string|min:8',
+            'username' => $noRequired ? 'nullable' : 'required|string|max:255',
+            'host' => $noRequired ? 'nullable' : 'required|string|max:255',
             'subdomains' => 'nullable',
             'port' => 'nullable|numeric',
         ];