From 4eecb6328e2928e94388ee7bfed800a08f241ff7 Mon Sep 17 00:00:00 2001 From: Wroud Date: Sat, 27 Mar 2021 13:34:08 +0300 Subject: [PATCH] fix: CB-796 skip local authorization --- .../plugin-authentication/src/AuthenticationService.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/webapp/packages/plugin-authentication/src/AuthenticationService.ts b/webapp/packages/plugin-authentication/src/AuthenticationService.ts index 05067b9c06..467e583719 100644 --- a/webapp/packages/plugin-authentication/src/AuthenticationService.ts +++ b/webapp/packages/plugin-authentication/src/AuthenticationService.ts @@ -8,7 +8,7 @@ import { AdministrationScreenService } from '@cloudbeaver/core-administration'; import { AppScreenService } from '@cloudbeaver/core-app'; -import { AppAuthService, AuthProviderContext, AuthProviderService, AuthProvidersResource, UserInfoResource } from '@cloudbeaver/core-authentication'; +import { AppAuthService, AuthProviderContext, AuthProviderService, AuthProvidersResource, AUTH_PROVIDER_LOCAL_ID, UserInfoResource } from '@cloudbeaver/core-authentication'; import { injectable, Bootstrap } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; import type { IExecutorHandler } from '@cloudbeaver/core-executor'; @@ -93,6 +93,12 @@ export class AuthenticationService extends Bootstrap { load(): void { } private requestAuthProviderHandler: IExecutorHandler = async (data, contexts) => { + if (data.type === AUTH_PROVIDER_LOCAL_ID) { + const provider = contexts.getContext(AuthProviderContext); + provider.auth(); + return; + } + await this.authProvidersResource.load(); await this.userInfoResource.load();