mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure the Generate ERD option is hidden if the connection to the database is not allowed. #5149
This commit is contained in:
@@ -99,6 +99,9 @@ define('pgadmin.node.database', [
|
|||||||
name: 'generate_erd', node: 'database', module: this,
|
name: 'generate_erd', node: 'database', module: this,
|
||||||
applies: ['object', 'context'], callback: 'generate_erd',
|
applies: ['object', 'context'], callback: 'generate_erd',
|
||||||
category: 'erd', priority: 5, label: gettext('Generate ERD'),
|
category: 'erd', priority: 5, label: gettext('Generate ERD'),
|
||||||
|
enable: (node) => {
|
||||||
|
return node.allowConn;
|
||||||
|
}
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
_.bindAll(this, 'connection_lost');
|
_.bindAll(this, 'connection_lost');
|
||||||
|
|||||||
Reference in New Issue
Block a user