From 5fc38bda7c155c1ffdc8dfd4b46d3118cf708d49 Mon Sep 17 00:00:00 2001 From: RhodeCode Admin Date: Thu, 3 Oct 2024 17:06:18 +0200 Subject: [PATCH] fix(ssl): explicitly disable mercurial web_push ssl flag to prevent from errors about ssl required --- rhodecode/apps/admin/views/settings.py | 10 +++++++++- rhodecode/lib/utils.py | 5 +++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/rhodecode/apps/admin/views/settings.py b/rhodecode/apps/admin/views/settings.py index 34a5687d..4f226076 100644 --- a/rhodecode/apps/admin/views/settings.py +++ b/rhodecode/apps/admin/views/settings.py @@ -75,10 +75,17 @@ class AdminSettingsView(BaseAppView): if not ret: raise Exception('Could not get application ui settings !') - settings = {} + settings = { + # legacy param that needs to be kept + 'web_push_ssl': False + } for each in ret: k = each.ui_key v = each.ui_value + # skip some options if they are defined + if k in ['push_ssl']: + continue + if k == '/': k = 'root_path' @@ -92,6 +99,7 @@ class AdminSettingsView(BaseAppView): v = each.ui_active settings[each.ui_section + '_' + k] = v + return settings @classmethod diff --git a/rhodecode/lib/utils.py b/rhodecode/lib/utils.py index 3cc0c0ee..5e7685b4 100644 --- a/rhodecode/lib/utils.py +++ b/rhodecode/lib/utils.py @@ -372,14 +372,15 @@ def prepare_config_data(clear_session=True, repo=None): """ from rhodecode.model.settings import VcsSettingsModel - config = [] - sa = meta.Session() settings_model = VcsSettingsModel(repo=repo, sa=sa) ui_settings = settings_model.get_ui_settings() ui_data = [] + config = [ + ('web', 'push_ssl', 'false'), + ] for setting in ui_settings: # Todo: remove this section once transition to *.ini files will be completed if setting.section in ('largefiles', 'vcs_git_lfs'):