From b28df5874e1723bad4a01215947f340bfcd7a89f Mon Sep 17 00:00:00 2001 From: Pravesh Sharma Date: Fri, 12 Jan 2024 17:20:51 +0530 Subject: [PATCH] Fixed an issue where multiple errors were showing if user does not have connect privileges. #7073 --- .../server_groups/servers/databases/static/js/database.js | 2 +- web/pgadmin/static/js/helpers/Notifier.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/pgadmin/browser/server_groups/servers/databases/static/js/database.js b/web/pgadmin/browser/server_groups/servers/databases/static/js/database.js index 45c8a6735..4d65eaca2 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/static/js/database.js +++ b/web/pgadmin/browser/server_groups/servers/databases/static/js/database.js @@ -421,7 +421,7 @@ define('pgadmin.node.database', [ setTimeout(function() { if (msg == 'CRYPTKEY_SET') { connect_to_database(_model, _data, _tree, _item, _wasConnected); - } else { + } else if (msg != 'ALERT_CALLED') { showServerPassword( gettext('Connect to database'), msg, _model, _data, _tree, _item, _status, diff --git a/web/pgadmin/static/js/helpers/Notifier.jsx b/web/pgadmin/static/js/helpers/Notifier.jsx index 8338dfbdd..f5740c490 100644 --- a/web/pgadmin/static/js/helpers/Notifier.jsx +++ b/web/pgadmin/static/js/helpers/Notifier.jsx @@ -164,7 +164,7 @@ class Notifier { return onJSONResult(); } this.alert(promptmsg, msg.replace(new RegExp(/\r?\n/, 'g'), '
')); - onJSONResult(); + onJSONResult('ALERT_CALLED'); } alert(title, text, onOkClick, okLabel=gettext('OK')) {