mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Removed old path library used to validate client secret path while google authentication. #5750
This commit is contained in:
@@ -11,7 +11,6 @@
|
|||||||
import pickle
|
import pickle
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
from pathlib import Path
|
|
||||||
from urllib.parse import unquote
|
from urllib.parse import unquote
|
||||||
|
|
||||||
from config import root
|
from config import root
|
||||||
@@ -90,7 +89,7 @@ def verify_credentials():
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
return bad_request(errormsg=str(e))
|
return bad_request(errormsg=str(e))
|
||||||
|
|
||||||
if client_secret_path is not None and Path(client_secret_path).exists():
|
if client_secret_path and os.path.exists(client_secret_path):
|
||||||
with open(client_secret_path, 'r') as json_file:
|
with open(client_secret_path, 'r') as json_file:
|
||||||
client_config = json.load(json_file)
|
client_config = json.load(json_file)
|
||||||
|
|
||||||
|
|||||||
@@ -62,14 +62,16 @@ class PgadminPage:
|
|||||||
self.driver.refresh()
|
self.driver.refresh()
|
||||||
try:
|
try:
|
||||||
WebDriverWait(self.driver, 3).until(EC.alert_is_present())
|
WebDriverWait(self.driver, 3).until(EC.alert_is_present())
|
||||||
self.driver.switch_to_alert().accept()
|
self.driver.switch_to.alert.accept()
|
||||||
attempt = attempt + 1
|
attempt = attempt + 1
|
||||||
except TimeoutException:
|
except TimeoutException:
|
||||||
attempt = attempt + 1
|
attempt = attempt + 1
|
||||||
|
|
||||||
self.click_element(self.find_by_css_selector(
|
self.click_element(self.find_by_css_selector(
|
||||||
"li[data-label='Reset Layout']"))
|
"li[data-label='Reset Layout']"))
|
||||||
self.click_modal('OK')
|
self.click_modal('Yes')
|
||||||
|
if WebDriverWait(self.driver, 3).until(EC.alert_is_present()):
|
||||||
|
self.driver.switch_to.alert.accept()
|
||||||
self.wait_for_reloading_indicator_to_disappear()
|
self.wait_for_reloading_indicator_to_disappear()
|
||||||
|
|
||||||
def refresh_page(self):
|
def refresh_page(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user