ssh: don't show the SSH clone url if ssh is disabled
This commit is contained in:
parent
9c22bde88e
commit
5d8ed27c02
3 changed files with 6 additions and 4 deletions
|
|
@ -48,12 +48,9 @@ class RepoSummaryView(RepoAppView):
|
|||
|
||||
def load_default_context(self):
|
||||
c = self._get_local_tmpl_context(include_app_defaults=True)
|
||||
|
||||
c.rhodecode_repo = None
|
||||
if not c.repository_requirements_missing:
|
||||
c.rhodecode_repo = self.rhodecode_vcs_repo
|
||||
|
||||
|
||||
return c
|
||||
|
||||
def _get_readme_data(self, db_repo, default_renderer):
|
||||
|
|
|
|||
|
|
@ -331,6 +331,9 @@ def attach_context_attributes(context, request, user_id):
|
|||
# INI stored
|
||||
context.labs_active = str2bool(
|
||||
config.get('labs_settings_active', 'false'))
|
||||
context.ssh_enabled = str2bool(
|
||||
config.get('ssh.generate_authorized_keyfile', 'false'))
|
||||
|
||||
context.visual.allow_repo_location_change = str2bool(
|
||||
config.get('allow_repo_location_change', True))
|
||||
context.visual.allow_custom_hooks_settings = str2bool(
|
||||
|
|
|
|||
|
|
@ -49,7 +49,9 @@
|
|||
<select id="clone_option" name="clone_option">
|
||||
<option value="http" selected="selected">HTTP</option>
|
||||
<option value="http_id">HTTP UID</option>
|
||||
<option value="ssh">SSH</option>
|
||||
% if c.ssh_enabled:
|
||||
<option value="ssh">SSH</option>
|
||||
% endif
|
||||
</select>
|
||||
</div>
|
||||
<div class="right-clone">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue