mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 00:43:24 +08:00
f9648de897
Co-Authored-By: Bianca Nenciu <nbianca@users.noreply.github.com> Co-Authored-By: David Taylor <david@taylorhq.com>
36 lines
1.0 KiB
Handlebars
36 lines
1.0 KiB
Handlebars
{{#if model}}
|
|
<table class='api-keys grid'>
|
|
<thead>
|
|
<th>{{i18n 'admin.api.key'}}</th>
|
|
<th>{{i18n 'admin.api.user'}}</th>
|
|
<th> </th>
|
|
</thead>
|
|
<tbody>
|
|
{{#each model as |k|}}
|
|
<tr>
|
|
<td class='key'>{{k.key}}</td>
|
|
<td class="key-user">
|
|
{{#if k.user}}
|
|
{{#link-to 'adminUser' k.user}}
|
|
{{avatar k.user imageSize="small"}}
|
|
{{/link-to}}
|
|
{{else}}
|
|
{{i18n 'admin.api.all_users'}}
|
|
{{/if}}
|
|
</td>
|
|
<td class="key-controls">
|
|
{{d-button class="btn-default" action=(action "regenerateKey") actionParam=k icon="undo" label='admin.api.regenerate'}}
|
|
{{d-button class="btn-default" action=(action "revokeKey") actionParam=k icon="times" label='admin.api.revoke'}}
|
|
</td>
|
|
</tr>
|
|
{{/each}}
|
|
</tbody>
|
|
</table>
|
|
{{else}}
|
|
<p>{{i18n 'admin.api.none'}}</p>
|
|
{{/if}}
|
|
|
|
{{#unless hasMasterKey}}
|
|
<button class='btn btn-icon no-text btn-primary' {{action "generateMasterKey"}}>{{d-icon "key"}}</button>
|
|
{{/unless}}
|