mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
fix(core-connections): CB-363 connection deletion
This commit is contained in:
@@ -73,7 +73,7 @@ export class ConnectionDialogsService {
|
||||
const connection = this.connectionInfoResource.get(connectionId);
|
||||
|
||||
return !context.data.objectFeatures.includes(EObjectFeature.dataSource) ||
|
||||
!connection?.features.includes(EConnectionFeature.temporary);
|
||||
!connection?.features.includes(EConnectionFeature.manageable);
|
||||
},
|
||||
title: 'ui_delete',
|
||||
onClick: (context: IMenuContext<NavNode>) => {
|
||||
|
||||
@@ -73,9 +73,9 @@ export class ConnectionsManagerService {
|
||||
}
|
||||
|
||||
async deleteConnection(id: string) {
|
||||
const connection = this.connectionInfo.get(id);
|
||||
const connection = await this.connectionInfo.load(id);
|
||||
|
||||
if (!connection?.features.includes(EConnectionFeature.temporary)) {
|
||||
if (!connection.features.includes(EConnectionFeature.manageable)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,5 +11,6 @@ export enum EConnectionFeature {
|
||||
virtual = 'virtual',
|
||||
temporary = 'temporary',
|
||||
readOnly = 'readOnly',
|
||||
provided = 'provided'
|
||||
provided = 'provided',
|
||||
manageable = 'manageable'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user