Resolved an issue about missing 'canDrop' function check for the browser
tree nodes.
Each individual node is responsible for introducing the 'canDrop'
function/flag to decide whether the 'Delete/Drop' context menu should be
enabled/disabled.
In commit-id: 26aa5607ad8eb92591e732837e6aa1a0c48f62b3, 'obj.canDrop'
was set to true in the 'pgBrowser.Node' in delete callback, just to make
the server-group droppable, which is wrong, as all the nodes are
getting affected because of this change in a wrong way.
To fix the issue, added the 'canDrop' function in the server-group node.
Apart from them, also added restriction for not allowing to delete the
default server-group.
Also, handled the same restriction at the server end.
Branch
------
master
Details
-------
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=2c7a45814cd642cbe2c8b4364de392c4b00f841c
Author: Surinder Kumar <surinder.kumar@enterprisedb.com>
Modified Files
--------------
web/pgadmin/browser/server_groups/__init__.py | 10 ++++++++++
.../server_groups/templates/server_groups/server_groups.js | 11 ++++++-----
web/pgadmin/browser/templates/browser/js/node.js | 3 +--
3 files changed, 17 insertions(+), 7 deletions(-)