Ensure we don't show the full path on the server when using virtual filesystem roots in server mode for SSL certs. Fixes #2866

pull/6/head
Murtuza Zabuawala 2017-11-27 11:25:50 +00:00 committed by Dave Page
parent 542f2911a3
commit d614c88ada
1 changed files with 1 additions and 3 deletions

View File

@ -25,7 +25,6 @@ import config
from config import PG_DEFAULT_DRIVER
from pgadmin.model import db, Server, ServerGroup, User
from pgadmin.utils.driver import get_driver
from pgadmin.utils import get_storage_directory
def has_any(data, keys):
"""
@ -295,10 +294,9 @@ class ServerNode(PGChildNodeView):
field in required_ssl_fields_server_mode:
# Set file manager directory from preference
import os
storage_dir = get_storage_directory()
file_extn = '.key' if field.endswith('key') else '.crt'
dummy_ssl_file = os.path.join(
storage_dir, '.postgresql',
'<STORAGE_DIR>', '.postgresql',
'postgresql' + file_extn
)
data[field] = dummy_ssl_file