Skip to content

Commit 98c888e

Browse files
Fixed the error occurring during logout from pgadmin when using OAuth2 authnecation with query tool open.#8299
1 parent 168aaa2 commit 98c888e

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

web/pgadmin/authenticate/oauth2.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,13 @@ def oauth_logout():
7676

7777
if not current_user.is_authenticated:
7878
return redirect(get_safe_post_logout_redirect())
79+
80+
# Logout the user first to avoid crypt key issue while
81+
# cancelling existing query tool transactions
82+
logout_user()
7983
for key in list(session.keys()):
8084
session.pop(key)
8185

82-
logout_user()
8386
if logout_url:
8487
return redirect(logout_url.format(
8588
redirect_uri=request.url_root,

web/regression/feature_tests/pg_datatype_validation_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def before(self):
7575
# For this test case we need to set "Insert bracket pairs?"
7676
# SQL Editor preference to 'false' to avoid codemirror
7777
# to add matching closing bracket by it self.
78-
self._update_preferences()
78+
#self._update_preferences()
7979

8080
# close the db connection
8181
connection.close()

web/regression/feature_utils/locators.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,10 @@ class NavMenuLocators:
6363

6464
specified_sub_node_of_pref_tree_node = \
6565
"//*[@id='treeContainer']//div//span[text()='{1}']"
66+
6667
insert_bracket_pair_switch_btn = \
67-
"//label[text()='Insert bracket pairs?']//following::div[1]//span"
68+
("//div[label[text()='Insert bracket pairs?']]/"
69+
"following-sibling::div//input")
6870

6971
copy_sql_to_query_tool_switch_btn = \
7072
"//label[text()='Copy SQL from main window to query tool?']" \

0 commit comments

Comments
 (0)