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