fix(core-connections): CB-363 connection deletion

This commit is contained in:
Wroud
2020-10-06 13:08:32 +03:00
parent 65c71d9b3b
commit ad207efec1
3 changed files with 5 additions and 4 deletions
@@ -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'
}