Show More
@@ -41,6 +41,9 b' class MyAccountSshKeysView(BaseAppView, ' | |||||
41 | def load_default_context(self): |
|
41 | def load_default_context(self): | |
42 | c = self._get_local_tmpl_context() |
|
42 | c = self._get_local_tmpl_context() | |
43 | c.user = c.auth_user.get_instance() |
|
43 | c.user = c.auth_user.get_instance() | |
|
44 | ||||
|
45 | c.ssh_enabled = self.request.registry.settings.get( | |||
|
46 | 'ssh.generate_authorized_keyfile') | |||
44 | self._register_global_c(c) |
|
47 | self._register_global_c(c) | |
45 | return c |
|
48 | return c | |
46 |
|
49 |
@@ -11,6 +11,9 b'' | |||||
11 | <th>${_('Created')}</th> |
|
11 | <th>${_('Created')}</th> | |
12 | <th>${_('Action')}</th> |
|
12 | <th>${_('Action')}</th> | |
13 | </tr> |
|
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 | %if c.user_ssh_keys: |
|
17 | %if c.user_ssh_keys: | |
15 | %for ssh_key in c.user_ssh_keys: |
|
18 | %for ssh_key in c.user_ssh_keys: | |
16 | <tr class=""> |
|
19 | <tr class=""> | |
@@ -32,11 +35,13 b'' | |||||
32 | </tr> |
|
35 | </tr> | |
33 | %endfor |
|
36 | %endfor | |
34 | %else: |
|
37 | %else: | |
35 |
<tr><td><div class=" |
|
38 | <tr><td colspan="4"><div class="">${_('No additional ssh keys specified')}</div></td></tr> | |
|
39 | %endif | |||
36 | %endif |
|
40 | % endif | |
37 | </table> |
|
41 | </table> | |
38 | </div> |
|
42 | </div> | |
39 |
|
43 | |||
|
44 | % if c.ssh_enabled: | |||
40 | <div class="user_ssh_keys"> |
|
45 | <div class="user_ssh_keys"> | |
41 | ${h.secure_form(h.route_path('my_account_ssh_keys_add'), method='POST', request=request)} |
|
46 | ${h.secure_form(h.route_path('my_account_ssh_keys_add'), method='POST', request=request)} | |
42 | <div class="form form-vertical"> |
|
47 | <div class="form form-vertical"> | |
@@ -66,6 +71,7 b'' | |||||
66 | </div> |
|
71 | </div> | |
67 | ${h.end_form()} |
|
72 | ${h.end_form()} | |
68 | </div> |
|
73 | </div> | |
|
74 | % endif | |||
69 | </div> |
|
75 | </div> | |
70 | </div> |
|
76 | </div> | |
71 |
|
77 |
General Comments 0
You need to be logged in to leave comments.
Login now