mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-10-25 22:20:05 -05:00
Fixed an issue where the database server is not connected using a service file. #5889
This commit is contained in:
1 parent
1c0b826d23
commit
a008f9ba79
4 files changed
+10
-4
No files matched your search
@@ -641,6 +641,8 @@ WHERE db.oid = {0}""".format(did))
|
||||
self.local_bind_port if self.use_ssh_tunnel else self.port
|
||||
dsn_args['dbname'] = database
|
||||
dsn_args['user'] = user
|
||||
if self.service is not None:
|
||||
dsn_args['service'] = self.service
|
||||
|
||||
# Make a copy to display the connection string on GUI.
|
||||
display_dsn_args = dsn_args.copy()
|
||||
@@ -657,7 +659,7 @@ WHERE db.oid = {0}""".format(did))
|
||||
orig_value = value
|
||||
# Getting complete file path if the key is one of the below.
|
||||
if key in ['passfile', 'sslcert', 'sslkey', 'sslrootcert',
|
||||
'sslcrl', 'service', 'sslcrldir']:
|
||||
'sslcrl', 'sslcrldir']:
|
||||
with_complete_path = True
|
||||
value = get_complete_file_path(value)
|
||||
|
||||
|
||||
@@ -268,7 +268,7 @@ class Connection(BaseConnection):
|
||||
password, encpass, is_update_password = self._check_user_password(
|
||||
kwargs)
|
||||
|
||||
passfile = manager.get_connection_param_value('passfile')
|
||||
passfile = kwargs['passfile'] if 'passfile' in kwargs else None
|
||||
tunnel_password = kwargs['tunnel_password'] if 'tunnel_password' in \
|
||||
kwargs else ''
|
||||
|
||||
@@ -305,7 +305,7 @@ class Connection(BaseConnection):
|
||||
# we will check for pgpass file availability from connection manager
|
||||
# if it's present then we will use it
|
||||
if not password and not encpass and not passfile:
|
||||
passfile = manager.passfile if manager.passfile else None
|
||||
passfile = manager.get_connection_param_value('passfile')
|
||||
if manager.passexec:
|
||||
password = manager.passexec.get()
|
||||
|
||||
|
||||
@@ -642,6 +642,8 @@ WHERE db.oid = {0}""".format(did))
|
||||
self.local_bind_port if self.use_ssh_tunnel else self.port
|
||||
dsn_args['dbname'] = database
|
||||
dsn_args['user'] = user
|
||||
if self.service is not None:
|
||||
dsn_args['service'] = self.service
|
||||
|
||||
# Make a copy to display the connection string on GUI.
|
||||
display_dsn_args = dsn_args.copy()
|
||||
@@ -658,7 +660,7 @@ WHERE db.oid = {0}""".format(did))
|
||||
orig_value = value
|
||||
# Getting complete file path if the key is one of the below.
|
||||
if key in ['passfile', 'sslcert', 'sslkey', 'sslrootcert',
|
||||
'sslcrl', 'service', 'sslcrldir']:
|
||||
'sslcrl', 'sslcrldir']:
|
||||
with_complete_path = True
|
||||
value = get_complete_file_path(value)
|
||||
|
||||
|
||||
Reference in new issue
Block a user