##// END OF EJS Templates
ssh: don't show the SSH clone url if ssh is disabled
marcink -
r2498:5fe36cd7 default
parent child Browse files
Show More
@@ -48,12 +48,9 b' class RepoSummaryView(RepoAppView):'
48
48
49 def load_default_context(self):
49 def load_default_context(self):
50 c = self._get_local_tmpl_context(include_app_defaults=True)
50 c = self._get_local_tmpl_context(include_app_defaults=True)
51
52 c.rhodecode_repo = None
51 c.rhodecode_repo = None
53 if not c.repository_requirements_missing:
52 if not c.repository_requirements_missing:
54 c.rhodecode_repo = self.rhodecode_vcs_repo
53 c.rhodecode_repo = self.rhodecode_vcs_repo
55
56
57 return c
54 return c
58
55
59 def _get_readme_data(self, db_repo, default_renderer):
56 def _get_readme_data(self, db_repo, default_renderer):
@@ -331,6 +331,9 b' def attach_context_attributes(context, r'
331 # INI stored
331 # INI stored
332 context.labs_active = str2bool(
332 context.labs_active = str2bool(
333 config.get('labs_settings_active', 'false'))
333 config.get('labs_settings_active', 'false'))
334 context.ssh_enabled = str2bool(
335 config.get('ssh.generate_authorized_keyfile', 'false'))
336
334 context.visual.allow_repo_location_change = str2bool(
337 context.visual.allow_repo_location_change = str2bool(
335 config.get('allow_repo_location_change', True))
338 config.get('allow_repo_location_change', True))
336 context.visual.allow_custom_hooks_settings = str2bool(
339 context.visual.allow_custom_hooks_settings = str2bool(
@@ -49,7 +49,9 b''
49 <select id="clone_option" name="clone_option">
49 <select id="clone_option" name="clone_option">
50 <option value="http" selected="selected">HTTP</option>
50 <option value="http" selected="selected">HTTP</option>
51 <option value="http_id">HTTP UID</option>
51 <option value="http_id">HTTP UID</option>
52 % if c.ssh_enabled:
52 <option value="ssh">SSH</option>
53 <option value="ssh">SSH</option>
54 % endif
53 </select>
55 </select>
54 </div>
56 </div>
55 <div class="right-clone">
57 <div class="right-clone">
General Comments 0
You need to be logged in to leave comments. Login now