# HG changeset patch # User Marcin Kuzminski # Date 2017-05-04 10:30:42 # Node ID 4923a1ad17f24d16d209d395e4f72426861d7df2 # Parent 49fb0ceca7f15acace81ea710b32457cce0e7f38 system-info: expose the common certificate file path. diff --git a/rhodecode/apps/admin/views/system_info.py b/rhodecode/apps/admin/views/system_info.py --- a/rhodecode/apps/admin/views/system_info.py +++ b/rhodecode/apps/admin/views/system_info.py @@ -106,6 +106,7 @@ class AdminSystemInfoSettingsView(BaseAp (_('RhodeCode Server IP'), val('server')['server_ip'], state('server')), (_('RhodeCode Server ID'), val('server')['server_id'], state('server')), (_('RhodeCode Configuration'), val('rhodecode_config')['path'], state('rhodecode_config')), + (_('RhodeCode Certificate'), val('rhodecode_config')['cert_path'], state('rhodecode_config')), (_('Workers'), val('rhodecode_config')['config']['server:main'].get('workers', '?'), state('rhodecode_config')), (_('Worker Type'), val('rhodecode_config')['config']['server:main'].get('worker_class', 'sync'), state('rhodecode_config')), ('', '', ''), # spacer diff --git a/rhodecode/lib/system_info.py b/rhodecode/lib/system_info.py --- a/rhodecode/lib/system_info.py +++ b/rhodecode/lib/system_info.py @@ -570,6 +570,10 @@ def rhodecode_config(): log.exception('Failed to read .ini file for display') parsed_ini = {} + cert_path = os.path.join( + os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(path)))), + '.rccontrol-profile/etc/ca-bundle.crt') + rhodecode_ini_safe['server:main'] = parsed_ini blacklist = [ @@ -608,7 +612,8 @@ def rhodecode_config(): rhodecode_ini_safe.pop(k, None) # TODO: maybe put some CONFIG checks here ? - return SysInfoRes(value={'config': rhodecode_ini_safe, 'path': path}) + return SysInfoRes(value={'config': rhodecode_ini_safe, + 'path': path, 'cert_path': cert_path}) def database_info():