mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 19:56:02 +00:00
cherri pick file
This commit is contained in:
@@ -201,9 +201,9 @@ module.exports = {
|
|||||||
async list(_params, req) {
|
async list(_params, req) {
|
||||||
const storage = require('./storage');
|
const storage = require('./storage');
|
||||||
|
|
||||||
const storageConnectionst = await storage.connections();
|
const storageConnections = await storage.connections();
|
||||||
if (storageConnectionst) {
|
if (storageConnections) {
|
||||||
return storageConnectionst;
|
return storageConnections;
|
||||||
}
|
}
|
||||||
if (portalConnections) {
|
if (portalConnections) {
|
||||||
if (platformInfo.allowShellConnection) return portalConnections;
|
if (platformInfo.allowShellConnection) return portalConnections;
|
||||||
@@ -342,6 +342,14 @@ module.exports = {
|
|||||||
if (volatile) {
|
if (volatile) {
|
||||||
return volatile;
|
return volatile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const storage = require('./storage');
|
||||||
|
|
||||||
|
const storageConnection = await storage.getConnection({conid});
|
||||||
|
if (storageConnection) {
|
||||||
|
return storageConnection;
|
||||||
|
}
|
||||||
|
|
||||||
if (portalConnections) {
|
if (portalConnections) {
|
||||||
const res = portalConnections.find(x => x._id == conid) || null;
|
const res = portalConnections.find(x => x._id == conid) || null;
|
||||||
return mask && !platformInfo.allowShellConnection ? maskConnection(res) : res;
|
return mask && !platformInfo.allowShellConnection ? maskConnection(res) : res;
|
||||||
|
|||||||
Reference in New Issue
Block a user