mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-09 06:55:54 -06:00
Ensure that the correct user should be selected in the new connection dialog. Fixes #7264
This commit is contained in:
parent
b2b14051c3
commit
143ae19b8d
@ -33,6 +33,7 @@ Bug fixes
|
||||
| `Issue #7239 <https://redmine.postgresql.org/issues/7239>`_ - Fixed an issue where the newly added table is not visible under the Tables node on refresh.
|
||||
| `Issue #7261 <https://redmine.postgresql.org/issues/7261>`_ - Correct typo in the documentation.
|
||||
| `Issue #7263 <https://redmine.postgresql.org/issues/7263>`_ - Fixed schema diff issue where function's difference DDL was showing incorrectly when arguments had default values with commas.
|
||||
| `Issue #7264 <https://redmine.postgresql.org/issues/7264>`_ - Ensure that the correct user should be selected in the new connection dialog.
|
||||
| `Issue #7265 <https://redmine.postgresql.org/issues/7265>`_ - Fixed schema diff issue in which the option 'null' doesn't appear in the DDL statement for the foreign table.
|
||||
| `Issue #7267 <https://redmine.postgresql.org/issues/7267>`_ - Fixed an issue where unexpected error messages are displayed when users change the language via preferences.
|
||||
| `Issue #7269 <https://redmine.postgresql.org/issues/7269>`_ - Ensure that pgAdmin4 should work with latest jinja2 version.
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user