Show More
@@ -68,7 +68,8 b' class AdminPermissionsView(BaseAppView, ' | |||||
68 |
|
68 | |||
69 | c.user = User.get_default_user(refresh=True) |
|
69 | c.user = User.get_default_user(refresh=True) | |
70 |
|
70 | |||
71 | app_settings = SettingsModel().get_all_settings() |
|
71 | app_settings = c.rc_config | |
|
72 | ||||
72 | defaults = { |
|
73 | defaults = { | |
73 | 'anonymous': c.user.active, |
|
74 | 'anonymous': c.user.active, | |
74 | 'default_register_message': app_settings.get( |
|
75 | 'default_register_message': app_settings.get( |
@@ -445,7 +445,7 b' class AdminSettingsView(BaseAppView):' | |||||
445 | def settings_issuetracker(self): |
|
445 | def settings_issuetracker(self): | |
446 | c = self.load_default_context() |
|
446 | c = self.load_default_context() | |
447 | c.active = 'issuetracker' |
|
447 | c.active = 'issuetracker' | |
448 | defaults = SettingsModel().get_all_settings() |
|
448 | defaults = c.rc_config | |
449 |
|
449 | |||
450 | entry_key = 'rhodecode_issuetracker_pat_' |
|
450 | entry_key = 'rhodecode_issuetracker_pat_' | |
451 |
|
451 |
@@ -289,7 +289,7 b' def attach_context_attributes(context, r' | |||||
289 | config = request.registry.settings |
|
289 | config = request.registry.settings | |
290 |
|
290 | |||
291 | rc_config = SettingsModel().get_all_settings(cache=True) |
|
291 | rc_config = SettingsModel().get_all_settings(cache=True) | |
292 |
|
292 | context.rc_config = rc_config | ||
293 | context.rhodecode_version = rhodecode.__version__ |
|
293 | context.rhodecode_version = rhodecode.__version__ | |
294 | context.rhodecode_edition = config.get('rhodecode.edition') |
|
294 | context.rhodecode_edition = config.get('rhodecode.edition') | |
295 | # unique secret + version does not leak the version but keep consistency |
|
295 | # unique secret + version does not leak the version but keep consistency |
@@ -2246,8 +2246,12 b' class Repository(Base, BaseModel):' | |||||
2246 | del override['ssh'] |
|
2246 | del override['ssh'] | |
2247 |
|
2247 | |||
2248 | # we didn't override our tmpl from **overrides |
|
2248 | # we didn't override our tmpl from **overrides | |
|
2249 | request = get_current_request() | |||
2249 | if not uri_tmpl: |
|
2250 | if not uri_tmpl: | |
2250 | rc_config = SettingsModel().get_all_settings(cache=True) |
|
2251 | if hasattr(request, 'call_context') and hasattr(request.call_context, 'rc_config'): | |
|
2252 | rc_config = request.call_context.rc_config | |||
|
2253 | else: | |||
|
2254 | rc_config = SettingsModel().get_all_settings(cache=True) | |||
2251 | if ssh: |
|
2255 | if ssh: | |
2252 | uri_tmpl = rc_config.get( |
|
2256 | uri_tmpl = rc_config.get( | |
2253 | 'rhodecode_clone_uri_ssh_tmpl') or self.DEFAULT_CLONE_URI_SSH |
|
2257 | 'rhodecode_clone_uri_ssh_tmpl') or self.DEFAULT_CLONE_URI_SSH | |
@@ -2255,7 +2259,6 b' class Repository(Base, BaseModel):' | |||||
2255 | uri_tmpl = rc_config.get( |
|
2259 | uri_tmpl = rc_config.get( | |
2256 | 'rhodecode_clone_uri_tmpl') or self.DEFAULT_CLONE_URI |
|
2260 | 'rhodecode_clone_uri_tmpl') or self.DEFAULT_CLONE_URI | |
2257 |
|
2261 | |||
2258 | request = get_current_request() |
|
|||
2259 | return get_clone_url(request=request, |
|
2262 | return get_clone_url(request=request, | |
2260 | uri_tmpl=uri_tmpl, |
|
2263 | uri_tmpl=uri_tmpl, | |
2261 | repo_name=self.repo_name, |
|
2264 | repo_name=self.repo_name, |
General Comments 0
You need to be logged in to leave comments.
Login now