Skip to content

Commit

Permalink
Merge branch 'devel' into fix/cb-5295/users-creation-flag
Browse files Browse the repository at this point in the history
  • Loading branch information
EvgeniaBzzz authored Sep 30, 2024
2 parents 387a3a7 + 38445f3 commit fa5fcd1
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 15 deletions.
4 changes: 2 additions & 2 deletions webapp/packages/core-blocks/src/Slide/SlideElement.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
display: inline-block;
vertical-align: top;
white-space: normal;
transition: transform cubic-bezier(0.4, 0, 0.2, 1) 0.6s;
transition: transform ease-in-out 0.4s;
transform: translateX(-100%);

&:first-child {
transition: width cubic-bezier(0.4, 0, 0.2, 1) 0.6s;
transition: width ease-in-out 0.4s;
width: 100%;
}
}
Expand Down
2 changes: 1 addition & 1 deletion webapp/packages/core-connections/src/DBDriverResource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export class DBDriverResource extends CachedMapResource<string, DBDriver, DBDriv

async addDriverLibraries(driverId: string, files: File[]) {
await this.graphQLService.sdk.uploadDriverLibrary(driverId, files);
await this.refresh(driverId);
await this.markOutdated(driverId);
}

protected override dataSet(key: string, value: DBDriver): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
*/
import { observable } from 'mobx';
import { observer } from 'mobx-react-lite';
import { Fragment } from 'react';

Expand All @@ -17,13 +18,14 @@ import {
Group,
GroupItem,
ObjectPropertyInfoForm,
useObservableRef,
useResource,
useTranslate,
} from '@cloudbeaver/core-blocks';
import { useService } from '@cloudbeaver/core-di';
import { CommonDialogService, DialogueStateResult } from '@cloudbeaver/core-dialogs';
import { NotificationService } from '@cloudbeaver/core-events';
import { FormMode, type TabContainerPanelComponent, useTab, useTabState } from '@cloudbeaver/core-ui';
import { FormMode, type TabContainerPanelComponent, useTab } from '@cloudbeaver/core-ui';

import type { UserFormProps } from '../AdministrationUserFormService.js';

Expand All @@ -39,9 +41,15 @@ export const UserFormOriginInfoPanel: TabContainerPanelComponent<UserFormProps>
}) {
const translate = useTranslate();
const editing = mode === FormMode.Edit;
const localState = useTabState<IState>(() => ({
selectedOrigin: '0',
}));
const localState = useObservableRef<IState>(
() => ({
selectedOrigin: '0',
}),
{
selectedOrigin: observable.ref,
},
false,
);
const userInfoLoader = useResource(UserFormOriginInfoPanel, UsersResource, state.userId, {
active: editing,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/
import React from 'react';

import { UsersResource } from '@cloudbeaver/core-authentication';
import { Bootstrap, injectable } from '@cloudbeaver/core-di';
import { FormMode } from '@cloudbeaver/core-ui';

Expand All @@ -25,10 +24,7 @@ const UserFormOriginInfoTab = React.lazy(async () => {

@injectable()
export class UserFormOriginPartBootstrap extends Bootstrap {
constructor(
private readonly administrationUserFormService: AdministrationUserFormService,
private readonly usersResource: UsersResource,
) {
constructor(private readonly administrationUserFormService: AdministrationUserFormService) {
super();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ export class CreateUserBootstrap extends Bootstrap {

this.actionService.addHandler({
id: 'users-table-base',
menus: [MENU_USERS_ADMINISTRATION],
actions: [ACTION_CREATE],
isActionApplicable: (context, action) => {
if (action === ACTION_CREATE && !this.administrationUsersManagementService.externalUserProviderEnabled) {
return this.authProvidersResource.has(AUTH_PROVIDER_LOCAL_ID);
isHidden: (context, action) => {
if (action === ACTION_CREATE) {
return this.administrationUsersManagementService.externalUserProviderEnabled || !this.authProvidersResource.has(AUTH_PROVIDER_LOCAL_ID);
}

return false;
Expand Down

0 comments on commit fa5fcd1

Please sign in to comment.