Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

critical patch which removes the bootauth from the service provider #4

Merged
merged 1 commit into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading