##// END OF EJS Templates
SSH: disable visually support ssh keys if we have them disabled in the .ini
marcink -
r2045:2161e3c4 default
parent child Browse files
Show More
@@ -41,6 +41,9 b' class MyAccountSshKeysView(BaseAppView, '
41 41 def load_default_context(self):
42 42 c = self._get_local_tmpl_context()
43 43 c.user = c.auth_user.get_instance()
44
45 c.ssh_enabled = self.request.registry.settings.get(
46 'ssh.generate_authorized_keyfile')
44 47 self._register_global_c(c)
45 48 return c
46 49
@@ -11,6 +11,9 b''
11 11 <th>${_('Created')}</th>
12 12 <th>${_('Action')}</th>
13 13 </tr>
14 % if not c.ssh_enabled:
15 <tr><td colspan="4"><div class="">${_('SSH Keys usage is currently disabled, please ask your administrator to enable them.')}</div></td></tr>
16 % else:
14 17 %if c.user_ssh_keys:
15 18 %for ssh_key in c.user_ssh_keys:
16 19 <tr class="">
@@ -32,11 +35,13 b''
32 35 </tr>
33 36 %endfor
34 37 %else:
35 <tr><td><div class="ip">${_('No additional ssh keys specified')}</div></td></tr>
38 <tr><td colspan="4"><div class="">${_('No additional ssh keys specified')}</div></td></tr>
39 %endif
36 40 %endif
37 41 </table>
38 42 </div>
39 43
44 % if c.ssh_enabled:
40 45 <div class="user_ssh_keys">
41 46 ${h.secure_form(h.route_path('my_account_ssh_keys_add'), method='POST', request=request)}
42 47 <div class="form form-vertical">
@@ -66,6 +71,7 b''
66 71 </div>
67 72 ${h.end_form()}
68 73 </div>
74 % endif
69 75 </div>
70 76 </div>
71 77
General Comments 0
You need to be logged in to leave comments. Login now