Skip to content

Commit

Permalink
Merge pull request #4 from fleetbase/dev-v0.0.5
Browse files Browse the repository at this point in the history
critical patch which removes the bootauth from the service provider
  • Loading branch information
roncodes authored Jul 19, 2024
2 parents 58e483f + a2c73ce commit bf3e355
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion extension.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
13 changes: 11 additions & 2 deletions server/src/Providers/RegistryBridgeServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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!');
Expand Down Expand Up @@ -72,7 +71,6 @@ public function register()
*/
public function boot()
{
Utils::bootRegistryAuth();
$this->registerCommands();
$this->registerMiddleware();
$this->registerExpansionsFrom(__DIR__ . '/../Expansions');
Expand All @@ -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()) {
Expand Down

0 comments on commit bf3e355

Please sign in to comment.