From 70b2ead852e9769019ce2741af48b92284bb2fe7 Mon Sep 17 00:00:00 2001 From: Akshay Joshi Date: Fri, 24 Mar 2023 13:03:35 +0530 Subject: [PATCH] Ensure that the schema diff tool should not allow comparison between Postgres Server and EDB Postgres Advanced Server. #5952 --- docs/en_US/release_notes_7_0.rst | 1 + web/pgadmin/browser/__init__.py | 1 + web/pgadmin/tools/schema_diff/__init__.py | 8 ++++++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/en_US/release_notes_7_0.rst b/docs/en_US/release_notes_7_0.rst index 27ff4ad4f..5f278df8f 100644 --- a/docs/en_US/release_notes_7_0.rst +++ b/docs/en_US/release_notes_7_0.rst @@ -53,5 +53,6 @@ Bug fixes | `Issue #5929 `_ - Dashboard graph Y-axis width should increase with label. | `Issue #5941 `_ - Fixed an issue where migration on external database is not working. | `Issue #5943 `_ - Use http for SVG namespace URLs which were changed to https for SonarQube fixes. + | `Issue #5952 `_ - Ensure that the schema diff tool should not allow comparison between Postgres Server and EDB Postgres Advanced Server. | `Issue #5955 `_ - Fix an issue where query tool is stuck when running query after discarding changed data. | `Issue #5958 `_ - Fix an issue where new dashboard graphs are partially following theme colors. diff --git a/web/pgadmin/browser/__init__.py b/web/pgadmin/browser/__init__.py index 2a5a5ed88..f6fd997cb 100644 --- a/web/pgadmin/browser/__init__.py +++ b/web/pgadmin/browser/__init__.py @@ -551,6 +551,7 @@ def get_shared_storage_list(): """ shared_storage_config = [] shared_storage_list = [] + restricted_shared_storage_list = [] if config.SERVER_MODE: shared_storage_keys = set(['name', 'path', 'restricted_access']) shared_storage_config = [ diff --git a/web/pgadmin/tools/schema_diff/__init__.py b/web/pgadmin/tools/schema_diff/__init__.py index e64f89e6e..b9a95d5ab 100644 --- a/web/pgadmin/tools/schema_diff/__init__.py +++ b/web/pgadmin/tools/schema_diff/__init__.py @@ -447,7 +447,9 @@ def compare_database(params): compare_pre_validation(params['trans_id'], params['source_sid'], params['target_sid']) if not status: - socketio.emit('compare_database_failed', error_msg, + socketio.emit('compare_database_failed', + error_msg.json if type( + error_msg) == Response else error_msg, namespace=SOCKETIO_NAMESPACE, to=request.sid) return error_msg @@ -586,7 +588,9 @@ def compare_schema(params): compare_pre_validation(params['trans_id'], params['source_sid'], params['target_sid']) if not status: - socketio.emit('compare_schema_failed', error_msg, + socketio.emit('compare_schema_failed', + error_msg.json if type( + error_msg) == Response else error_msg, namespace=SOCKETIO_NAMESPACE, to=request.sid) return error_msg