##// END OF EJS Templates
tokens: auth-token is not only for git/hg but also for svn....
marcink -
r442:94cb44ca default
parent child Browse files
Show More

The requested changes are too big and content was truncated. Show full diff

1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
@@ -1,102 +1,102 b''
1 1 <div class="panel panel-default">
2 2 <div class="panel-heading">
3 3 <h3 class="panel-title">${_('Authentication Tokens')}</h3>
4 4 </div>
5 5 <div class="panel-body">
6 6 <p>
7 7 ${_('Built-in tokens can be used to authenticate with all possible options.')}<br/>
8 ${_('Each token can have a role. VCS tokens can be used together with the authtoken auth plugin for git/hg operations.')}
8 ${_('Each token can have a role. VCS tokens can be used together with the authtoken auth plugin for git/hg/svn operations.')}
9 9 </p>
10 10 <table class="rctable auth_tokens">
11 11 <tr>
12 12 <td class="truncate-wrap td-authtoken"><div class="user_auth_tokens truncate autoexpand"><code>${c.user.api_key}</code></div></td>
13 13 <td class="td-buttons">
14 14 <span class="btn btn-mini btn-info disabled">${_('Built-in')}</span>
15 15 </td>
16 16 <td class="td-buttons">
17 17 <span class="btn btn-mini btn-info disabled">all</span>
18 18 </td>
19 19 <td class="td-exp">${_('expires')}: ${_('never')}</td>
20 20 <td class="td-action">
21 21 ${h.secure_form(url('my_account_auth_tokens'),method='delete')}
22 22 ${h.hidden('del_auth_token',c.user.api_key)}
23 23 ${h.hidden('del_auth_token_builtin',1)}
24 24 <button class="btn-link btn-danger" type="submit"
25 25 onclick="return confirm('${_('Confirm to reset this auth token: %s') % c.user.api_key}');">
26 26 <i class="icon-refresh"></i>
27 27 ${_('Reset')}
28 28 </button>
29 29 ${h.end_form()}
30 30 </td>
31 31 </tr>
32 32 %if c.user_auth_tokens:
33 33 %for auth_token in c.user_auth_tokens:
34 34 <tr class="${'expired' if auth_token.expired else ''}">
35 35 <td class="truncate-wrap td-authtoken"><div class="user_auth_tokens truncate autoexpand"><code>${auth_token.api_key}</code></div></td>
36 36 <td class="td-wrap">${auth_token.description}</td>
37 37 <td class="td-buttons">
38 38 <span class="btn btn-mini btn-info disabled">${auth_token.role_humanized}</span>
39 39 </td>
40 40 <td class="td-exp">
41 41 %if auth_token.expires == -1:
42 42 ${_('expires')}: ${_('never')}
43 43 %else:
44 44 %if auth_token.expired:
45 45 ${_('expired')}: ${h.age_component(h.time_to_utcdatetime(auth_token.expires))}
46 46 %else:
47 47 ${_('expires')}: ${h.age_component(h.time_to_utcdatetime(auth_token.expires))}
48 48 %endif
49 49 %endif
50 50 </td>
51 51 <td class="td-action">
52 52 ${h.secure_form(url('my_account_auth_tokens'),method='delete')}
53 53 ${h.hidden('del_auth_token',auth_token.api_key)}
54 54 <button class="btn btn-link btn-danger" type="submit"
55 55 onclick="return confirm('${_('Confirm to remove this auth token: %s') % auth_token.api_key}');">
56 56 ${_('Delete')}
57 57 </button>
58 58 ${h.end_form()}
59 59 </td>
60 60 </tr>
61 61 %endfor
62 62 %else:
63 63 <tr><td><div class="ip">${_('No additional auth token specified')}</div></td></tr>
64 64 %endif
65 65 </table>
66 66
67 67 <div class="user_auth_tokens">
68 68 ${h.secure_form(url('my_account_auth_tokens'), method='post')}
69 69 <div class="form form-vertical">
70 70 <!-- fields -->
71 71 <div class="fields">
72 72 <div class="field">
73 73 <div class="label">
74 74 <label for="new_email">${_('New authentication token')}:</label>
75 75 </div>
76 76 <div class="input">
77 77 ${h.text('description', placeholder=_('Description'))}
78 78 ${h.select('lifetime', '', c.lifetime_options)}
79 79 ${h.select('role', '', c.role_options)}
80 80 </div>
81 81 </div>
82 82 <div class="buttons">
83 83 ${h.submit('save',_('Add'),class_="btn")}
84 84 ${h.reset('reset',_('Reset'),class_="btn")}
85 85 </div>
86 86 </div>
87 87 </div>
88 88 ${h.end_form()}
89 89 </div>
90 90 </div>
91 91 </div>
92 92 <script>
93 93 $(document).ready(function(){
94 94 var select2Options = {
95 95 'containerCssClass': "drop-menu",
96 96 'dropdownCssClass': "drop-menu-dropdown",
97 97 'dropdownAutoWidth': true
98 98 };
99 99 $("#lifetime").select2(select2Options);
100 100 $("#role").select2(select2Options);
101 101 });
102 102 </script>
General Comments 0
You need to be logged in to leave comments. Login now