connections per role

This commit is contained in:
Jan Prochazka
2024-07-30 16:26:02 +02:00
parent 2c805b3357
commit 4c5da50a04
6 changed files with 10 additions and 7 deletions

View File

@@ -104,7 +104,7 @@ registerCommand({
category: 'New',
toolbarOrder: 1,
name: 'Connection',
testEnabled: () => !getCurrentConfig()?.runAsPortal,
testEnabled: () => !getCurrentConfig()?.runAsPortal && !getCurrentConfig()?.storageDatabase,
onClick: () => {
openNewTab({
title: 'New Connection',

View File

@@ -2,6 +2,7 @@ import _ from 'lodash';
import { openedConnections, currentDatabase, openedConnectionsWithTemporary, getCurrentConfig } from '../stores';
import { apiCall, strmid } from './api';
import { getConnectionList } from './metadataLoaders';
import hasPermission from '../utility/hasPermission';
// const doServerPing = async value => {
// const connectionList = getConnectionList();
@@ -11,7 +12,8 @@ import { getConnectionList } from './metadataLoaders';
const doServerPing = value => {
apiCall('server-connections/ping', {
conidArray: getCurrentConfig().storageDatabase ? ['__storage', ...value] : value,
conidArray:
getCurrentConfig().storageDatabase && hasPermission('internal-storage') ? ['__storage', ...value] : value,
strmid,
});
};