Show More
@@ -602,6 +602,12 b' class User(Base, BaseModel):' | |||
|
602 | 602 | return tokens.all() |
|
603 | 603 | |
|
604 | 604 | @property |
|
605 | def builtin_token_roles(self): | |
|
606 | return map(UserApiKeys._get_role_name, [ | |
|
607 | UserApiKeys.ROLE_API, UserApiKeys.ROLE_FEED, UserApiKeys.ROLE_HTTP | |
|
608 | ]) | |
|
609 | ||
|
610 | @property | |
|
605 | 611 | def ip_addresses(self): |
|
606 | 612 | ret = UserIpMap.query().filter(UserIpMap.user == self).all() |
|
607 | 613 | return [x.ip_addr for x in ret] |
@@ -10,11 +10,15 b'' | |||
|
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 |
<td class="td- |
|
|
14 |
<span class=" |
|
|
13 | <td class="td-tags"> | |
|
14 | <span class="tag disabled">${_('Built-in')}</span> | |
|
15 | 15 | </td> |
|
16 |
<td class="td- |
|
|
17 | <span class="btn btn-mini btn-info disabled">all</span> | |
|
16 | <td class="td-tags"> | |
|
17 | % for token in c.user.builtin_token_roles: | |
|
18 | <span class="tag disabled"> | |
|
19 | ${token} | |
|
20 | </span> | |
|
21 | % endfor | |
|
18 | 22 | </td> |
|
19 | 23 | <td class="td-exp">${_('expires')}: ${_('never')}</td> |
|
20 | 24 | <td class="td-action"> |
@@ -34,8 +38,8 b'' | |||
|
34 | 38 | <tr class="${'expired' if auth_token.expired else ''}"> |
|
35 | 39 | <td class="truncate-wrap td-authtoken"><div class="user_auth_tokens truncate autoexpand"><code>${auth_token.api_key}</code></div></td> |
|
36 | 40 | <td class="td-wrap">${auth_token.description}</td> |
|
37 |
<td class="td- |
|
|
38 |
<span class=" |
|
|
41 | <td class="td-tags"> | |
|
42 | <span class="tag disabled">${auth_token.role_humanized}</span> | |
|
39 | 43 | </td> |
|
40 | 44 | <td class="td-exp"> |
|
41 | 45 | %if auth_token.expires == -1: |
@@ -11,7 +11,11 b'' | |||
|
11 | 11 | <span class="tag disabled">${_('Built-in')}</span> |
|
12 | 12 | </td> |
|
13 | 13 | <td class="td-tags"> |
|
14 | <span class="tag disabled">all</span> | |
|
14 | % for token in c.user.builtin_token_roles: | |
|
15 | <span class="tag disabled"> | |
|
16 | ${token} | |
|
17 | </span> | |
|
18 | % endfor | |
|
15 | 19 | </td> |
|
16 | 20 | <td class="td-exp">${_('expires')}: ${_('never')}</td> |
|
17 | 21 | <td class="td-action"> |
General Comments 0
You need to be logged in to leave comments.
Login now