mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Treat databases with datallowconn=false appropriately. Fixes #1801
This commit is contained in:
committed by
Dave Page
parent
6ff2fe64b8
commit
81841cdb3c
@@ -240,11 +240,19 @@ define([
|
||||
var t = pgBrowser.tree, i = item, d = itemData;
|
||||
var parent_item = t.hasParent(i) ? t.parent(i): null,
|
||||
parent_data = parent_item ? t.itemData(parent_item) : null;
|
||||
if(!_.isUndefined(d) && !_.isNull(d) && !_.isNull(parent_data))
|
||||
return (
|
||||
(_.indexOf(restore_supported_nodes, d._type) !== -1 &&
|
||||
is_parent_catalog(itemData, item, data) ) ? true: false
|
||||
);
|
||||
if(!_.isUndefined(d) && !_.isNull(d) && !_.isNull(parent_data)) {
|
||||
if (_.indexOf(restore_supported_nodes, d._type) !== -1 &&
|
||||
is_parent_catalog(itemData, item, data) ) {
|
||||
if (d._type == 'database' && d.allowConn)
|
||||
return true;
|
||||
else if(d._type != 'database')
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user