mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Correct the logic to set the SUPPORT_SSH_TUNNEL flag, if the flag is set the False in local config file, then we should not override it.
This commit is contained in:
@@ -364,6 +364,11 @@ COOKIE_DEFAULT_DOMAIN = None
|
||||
SESSION_COOKIE_DOMAIN = None
|
||||
SESSION_COOKIE_SAMESITE = 'Lax'
|
||||
|
||||
##########################################################################
|
||||
# SSH Tunneling supports only for Python 2.7 and 3.4+
|
||||
##########################################################################
|
||||
SUPPORT_SSH_TUNNEL = True
|
||||
|
||||
##########################################################################
|
||||
# Local config settings
|
||||
##########################################################################
|
||||
@@ -380,12 +385,10 @@ try:
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
##########################################################################
|
||||
# SSH Tunneling supports only for Python 2.7 and 3.4+
|
||||
##########################################################################
|
||||
SUPPORT_SSH_TUNNEL = False
|
||||
if (
|
||||
(sys.version_info[0] == 2 and sys.version_info[1] >= 7) or
|
||||
(sys.version_info[0] == 3 and sys.version_info[1] >= 4)
|
||||
# SUPPORT_SSH_TUNNEL can be override in local config file and if that
|
||||
# setting is False in local config then we should not check the Python version.
|
||||
if (SUPPORT_SSH_TUNNEL is True and
|
||||
((sys.version_info[0] == 2 and sys.version_info[1] < 7) or
|
||||
(sys.version_info[0] == 3 and sys.version_info[1] < 4))
|
||||
):
|
||||
SUPPORT_SSH_TUNNEL = True
|
||||
SUPPORT_SSH_TUNNEL = False
|
||||
|
||||
Reference in New Issue
Block a user