2013-10-23 03:53:08 +08:00
|
|
|
{{#if model}}
|
|
|
|
<table class='api-keys'>
|
|
|
|
<tr>
|
2014-12-09 05:35:49 +08:00
|
|
|
<th>{{i18n 'admin.api.key'}}</th>
|
|
|
|
<th>{{i18n 'admin.api.user'}}</th>
|
2013-10-23 03:53:08 +08:00
|
|
|
<th> </th>
|
|
|
|
</tr>
|
2016-04-30 05:29:41 +08:00
|
|
|
{{#each model as |k|}}
|
2013-10-23 03:53:08 +08:00
|
|
|
<tr>
|
2014-12-13 02:28:20 +08:00
|
|
|
<td class='key'>{{k.key}}</td>
|
2013-10-23 03:53:08 +08:00
|
|
|
<td>
|
2014-12-13 02:28:20 +08:00
|
|
|
{{#if k.user}}
|
|
|
|
{{#link-to 'adminUser' k.user}}
|
|
|
|
{{avatar k.user imageSize="small"}}
|
2013-10-23 03:53:08 +08:00
|
|
|
{{/link-to}}
|
|
|
|
{{else}}
|
2014-12-09 05:35:49 +08:00
|
|
|
{{i18n 'admin.api.all_users'}}
|
2013-10-23 03:53:08 +08:00
|
|
|
{{/if}}
|
|
|
|
</td>
|
|
|
|
<td>
|
2014-12-13 02:28:20 +08:00
|
|
|
<button class='btn' {{action "regenerateKey" k}}><i class="fa fa-undo"></i>{{i18n 'admin.api.regenerate'}}</button>
|
|
|
|
<button class='btn' {{action "revokeKey" k}}><i class="fa fa-times"></i>{{i18n 'admin.api.revoke'}}</button>
|
2013-10-23 03:53:08 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{/each}}
|
|
|
|
</table>
|
2013-03-26 09:04:28 +08:00
|
|
|
{{else}}
|
2014-12-09 05:35:49 +08:00
|
|
|
<p>{{i18n 'admin.api.none'}}</p>
|
2013-03-26 09:04:28 +08:00
|
|
|
{{/if}}
|
2013-10-23 03:53:08 +08:00
|
|
|
|
|
|
|
{{#unless hasMasterKey}}
|
2014-12-09 05:35:49 +08:00
|
|
|
<button class='btn' {{action "generateMasterKey"}}><i class="fa fa-key"></i>{{i18n 'admin.api.generate_master'}}</button>
|
2013-10-23 03:53:08 +08:00
|
|
|
{{/unless }}
|