##// END OF EJS Templates
settings: remove links to rccontrol from settings and default to the docker image paths
super-admin -
r5315:add25550 default
parent child Browse files
Show More
@@ -1,59 +1,59 b''
1 1 # Copyright (C) 2016-2023 RhodeCode GmbH
2 2 #
3 3 # This program is free software: you can redistribute it and/or modify
4 4 # it under the terms of the GNU Affero General Public License, version 3
5 5 # (only), as published by the Free Software Foundation.
6 6 #
7 7 # This program is distributed in the hope that it will be useful,
8 8 # but WITHOUT ANY WARRANTY; without even the implied warranty of
9 9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 10 # GNU General Public License for more details.
11 11 #
12 12 # You should have received a copy of the GNU Affero General Public License
13 13 # along with this program. If not, see <http://www.gnu.org/licenses/>.
14 14 #
15 15 # This program is dual-licensed. If you wish to learn more about the
16 16 # RhodeCode Enterprise Edition, including its added features, Support services,
17 17 # and proprietary license terms, please see https://rhodecode.com/licenses/
18 18
19 19 import logging
20 20
21 21 from . import config_keys
22 22 from .events import SshKeyFileChangeEvent
23 23 from .subscribers import generate_ssh_authorized_keys_file_subscriber
24 24
25 25 from rhodecode.config.settings_maker import SettingsMaker
26 26
27 27 log = logging.getLogger(__name__)
28 28
29 29
30 30 def _sanitize_settings_and_apply_defaults(settings):
31 31 """
32 32 Set defaults, convert to python types and validate settings.
33 33 """
34 34 settings_maker = SettingsMaker(settings)
35 35
36 36 settings_maker.make_setting(config_keys.generate_authorized_keyfile, False, parser='bool')
37 37 settings_maker.make_setting(config_keys.wrapper_allow_shell, False, parser='bool')
38 38 settings_maker.make_setting(config_keys.enable_debug_logging, False, parser='bool')
39 39 settings_maker.make_setting(config_keys.ssh_key_generator_enabled, True, parser='bool')
40 40
41 41 settings_maker.make_setting(config_keys.authorized_keys_file_path, '~/.ssh/authorized_keys_rhodecode')
42 42 settings_maker.make_setting(config_keys.wrapper_cmd, '')
43 43 settings_maker.make_setting(config_keys.authorized_keys_line_ssh_opts, '')
44 44
45 settings_maker.make_setting(config_keys.ssh_hg_bin, '~/.rccontrol/vcsserver-1/profile/bin/hg')
46 settings_maker.make_setting(config_keys.ssh_git_bin, '~/.rccontrol/vcsserver-1/profile/bin/git')
47 settings_maker.make_setting(config_keys.ssh_svn_bin, '~/.rccontrol/vcsserver-1/profile/bin/svnserve')
45 settings_maker.make_setting(config_keys.ssh_hg_bin, '/usr/local/bin/rhodecode_bin/vcs_bin/hg')
46 settings_maker.make_setting(config_keys.ssh_git_bin, '/usr/local/bin/rhodecode_bin/vcs_bin/git')
47 settings_maker.make_setting(config_keys.ssh_svn_bin, '/usr/local/bin/rhodecode_bin/vcs_bin/svnserve')
48 48
49 49 settings_maker.env_expand()
50 50
51 51
52 52 def includeme(config):
53 53 settings = config.registry.settings
54 54 _sanitize_settings_and_apply_defaults(settings)
55 55
56 56 # if we have enable generation of file, subscribe to event
57 57 if settings[config_keys.generate_authorized_keyfile]:
58 58 config.add_subscriber(
59 59 generate_ssh_authorized_keys_file_subscriber, SshKeyFileChangeEvent)
General Comments 0
You need to be logged in to leave comments. Login now