mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-10-24 23:05:29 +08:00
CB-4173 configurable iam provider (#2126)
* CB-4174 configurable iam provider * CB-4174 refactor: display only available auth providers * CB-4174 refactor: display only available auth providers * CB-4174 refactor: display only available auth providers * CB-4174 chore: remove unused config properties --------- Co-authored-by: Aleksei Potsetsuev <wrouds@gmail.com> Co-authored-by: Evgenia Bezborodova <139753579+EvgeniaBzzz@users.noreply.github.com>
This commit is contained in:
co-authored by
Aleksei Potsetsuev
Evgenia Bezborodova
parent
c6e8d27e31
commit
dfd572aa4c
@@ -53,15 +53,10 @@ export function useAuthDialogState(accessRequest: boolean, providerId: string |
|
||||
const authInfoService = useService(AuthInfoService);
|
||||
const notificationService = useService(NotificationService);
|
||||
|
||||
const primaryId = authProvidersResource.resource.getPrimary();
|
||||
const adminPageActive = administrationScreenService.isAdministrationPageActive;
|
||||
const providers = authProvidersResource.data.filter(notEmptyProvider).sort(compareProviders);
|
||||
|
||||
const activeProviders = providers.filter(provider => {
|
||||
if (provider.id === primaryId && adminPageActive && accessRequest) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (provider.federated || provider.trusted || provider.private) {
|
||||
return false;
|
||||
}
|
||||
@@ -170,9 +165,6 @@ export function useAuthDialogState(accessRequest: boolean, providerId: string |
|
||||
|
||||
get configure(): boolean {
|
||||
if (state.activeProvider) {
|
||||
if (this.adminPageActive && authProvidersResource.resource.isPrimary(state.activeProvider.id)) {
|
||||
return false;
|
||||
}
|
||||
return !authProvidersResource.resource.isAuthEnabled(state.activeProvider.id);
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user