From a2c73ce2947dffcbd671119e0936b4bc142eacfc Mon Sep 17 00:00:00 2001 From: "Ronald A. Richardson" Date: Fri, 19 Jul 2024 17:40:42 +0800 Subject: [PATCH] critical patch which removes the bootauth from the service provider --- composer.json | 2 +- extension.json | 2 +- package.json | 2 +- .../src/Providers/RegistryBridgeServiceProvider.php | 13 +++++++++++-- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 34a6d21..66c7f6f 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "fleetbase/registry-bridge", - "version": "0.0.4", + "version": "0.0.5", "description": "Internal Bridge between Fleetbase API and Extensions Registry", "keywords": [ "fleetbase-extension", diff --git a/extension.json b/extension.json index fdca6f6..a1abc39 100644 --- a/extension.json +++ b/extension.json @@ -1,6 +1,6 @@ { "name": "Registry Bridge", - "version": "0.0.4", + "version": "0.0.5", "description": "Internal Bridge between Fleetbase API and Extensions Registry", "repository": "https://github.com/fleetbase/registry-bridge", "license": "AGPL-3.0-or-later", diff --git a/package.json b/package.json index c384367..d85b748 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fleetbase/registry-bridge-engine", - "version": "0.0.4", + "version": "0.0.5", "description": "Internal Bridge between Fleetbase API and Extensions Registry", "fleetbase": { "route": "extensions" diff --git a/server/src/Providers/RegistryBridgeServiceProvider.php b/server/src/Providers/RegistryBridgeServiceProvider.php index 00324f6..e342aee 100644 --- a/server/src/Providers/RegistryBridgeServiceProvider.php +++ b/server/src/Providers/RegistryBridgeServiceProvider.php @@ -4,7 +4,6 @@ use Fleetbase\Models\Setting; use Fleetbase\Providers\CoreServiceProvider; -use Fleetbase\RegistryBridge\Support\Utils; if (!class_exists(CoreServiceProvider::class)) { throw new \Exception('Registry Bridge cannot be loaded without `fleetbase/core-api` installed!'); @@ -72,7 +71,6 @@ public function register() */ public function boot() { - Utils::bootRegistryAuth(); $this->registerCommands(); $this->registerMiddleware(); $this->registerExpansionsFrom(__DIR__ . '/../Expansions'); @@ -82,6 +80,17 @@ public function boot() $this->mergeConfigFromSettings(); } + /** + * Merge configuration settings from the database into the application configuration. + * + * This function checks if there is a database connection available. If a connection exists, + * it retrieves the 'registry-bridge.registry.host' and 'registry-bridge.registry.token' values + * from the settings table and merges them into the application's configuration. If the settings + * are not available or the database connection does not exist, the function will return without + * making any changes. + * + * @return void + */ public function mergeConfigFromSettings() { if (Setting::doesntHaveConnection()) {