diff --git a/docs/en_US/release_notes_6_8.rst b/docs/en_US/release_notes_6_8.rst index 9cbab0119..6be78e49e 100644 --- a/docs/en_US/release_notes_6_8.rst +++ b/docs/en_US/release_notes_6_8.rst @@ -33,6 +33,7 @@ Bug fixes | `Issue #7239 `_ - Fixed an issue where the newly added table is not visible under the Tables node on refresh. | `Issue #7261 `_ - Correct typo in the documentation. | `Issue #7263 `_ - Fixed schema diff issue where function's difference DDL was showing incorrectly when arguments had default values with commas. + | `Issue #7264 `_ - Ensure that the correct user should be selected in the new connection dialog. | `Issue #7265 `_ - Fixed schema diff issue in which the option 'null' doesn't appear in the DDL statement for the foreign table. | `Issue #7267 `_ - Fixed an issue where unexpected error messages are displayed when users change the language via preferences. | `Issue #7269 `_ - Ensure that pgAdmin4 should work with latest jinja2 version. diff --git a/web/pgadmin/tools/sqleditor/__init__.py b/web/pgadmin/tools/sqleditor/__init__.py index 4ce592aa8..ac85b5eaf 100644 --- a/web/pgadmin/tools/sqleditor/__init__.py +++ b/web/pgadmin/tools/sqleditor/__init__.py @@ -1688,9 +1688,11 @@ def get_new_connection_user(sgid, sid=None): status, users = conn.execute_2darray( render_template(sql_path + _NODES_SQL) ) + _user = manager.user user_list = [ - {'value': user['rolname'], 'label': user['rolname']} for - user in users['rows'] if user['rolcanlogin']] + {'value': user['rolname'], 'label': user['rolname'], + 'selected': True if user['rolname'] == _user else False} + for user in users['rows'] if user['rolcanlogin']] else: status = False