2019-05-01 18:09:29 +00:00
|
|
|
{{#app-view class=(concat 'role ' (if (not isAuthorized) 'edit' 'list')) loading=isLoading authorized=isAuthorized enabled=isEnabled}}
|
2020-01-15 09:15:54 +00:00
|
|
|
{{#block-slot name='notification' as |status type|}}
|
2019-05-01 18:09:29 +00:00
|
|
|
{{partial 'dc/acls/roles/notifications'}}
|
|
|
|
{{/block-slot}}
|
2020-01-15 09:15:54 +00:00
|
|
|
{{#block-slot name='header'}}
|
2019-05-01 18:09:29 +00:00
|
|
|
<h1>
|
|
|
|
Access Controls
|
|
|
|
</h1>
|
|
|
|
{{#if isAuthorized }}
|
|
|
|
{{partial 'dc/acls/nav'}}
|
|
|
|
{{/if}}
|
|
|
|
{{/block-slot}}
|
2020-01-15 09:15:54 +00:00
|
|
|
{{#block-slot name='disabled'}}
|
2019-05-01 18:09:29 +00:00
|
|
|
{{partial 'dc/acls/disabled'}}
|
|
|
|
{{/block-slot}}
|
2020-01-15 09:15:54 +00:00
|
|
|
{{#block-slot name='authorization'}}
|
2019-05-01 18:09:29 +00:00
|
|
|
{{partial 'dc/acls/authorization'}}
|
|
|
|
{{/block-slot}}
|
2020-01-15 09:15:54 +00:00
|
|
|
{{#block-slot name='actions'}}
|
2019-05-01 18:09:29 +00:00
|
|
|
<a data-test-create href="{{href-to 'dc.acls.roles.create'}}" class="type-create">Create</a>
|
|
|
|
{{/block-slot}}
|
2020-01-15 09:15:54 +00:00
|
|
|
{{#block-slot name='content'}}
|
2019-05-01 18:09:29 +00:00
|
|
|
{{#if (gt items.length 0) }}
|
|
|
|
<form class="filter-bar">
|
|
|
|
{{freetext-filter searchable=searchable value=s placeholder="Search"}}
|
|
|
|
</form>
|
|
|
|
{{/if}}
|
|
|
|
{{#changeable-set dispatcher=searchable}}
|
2020-01-15 09:15:54 +00:00
|
|
|
{{#block-slot name='set' as |filtered|}}
|
2019-05-01 18:09:29 +00:00
|
|
|
{{#tabular-collection
|
|
|
|
items=(sort-by 'CreateIndex:desc' 'Name:asc' filtered) as |item index|
|
|
|
|
}}
|
2020-01-15 09:15:54 +00:00
|
|
|
{{#block-slot name='header'}}
|
2019-05-01 18:09:29 +00:00
|
|
|
<th>Name</th>
|
|
|
|
<th>Description</th>
|
|
|
|
<th>Policies</th>
|
|
|
|
{{/block-slot}}
|
2020-01-15 09:15:54 +00:00
|
|
|
{{#block-slot name='row'}}
|
2019-05-01 18:09:29 +00:00
|
|
|
<td data-test-role="{{item.Name}}">
|
|
|
|
<a href={{href-to 'dc.acls.roles.edit' item.ID}}>{{item.Name}}</a>
|
|
|
|
</td>
|
2019-06-05 08:25:32 +00:00
|
|
|
<td data-test-description>
|
2019-06-14 17:27:37 +00:00
|
|
|
<p>{{item.Description}}</p>
|
2019-05-01 18:09:29 +00:00
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{{#each item.Policies as |item|}}
|
2019-06-05 08:25:32 +00:00
|
|
|
<strong data-test-policy class={{policy/typeof item}}>{{item.Name}}</strong>
|
2019-05-01 18:09:29 +00:00
|
|
|
{{/each}}
|
|
|
|
</td>
|
|
|
|
{{/block-slot}}
|
2020-01-15 09:15:54 +00:00
|
|
|
{{#block-slot name='actions' as |index change checked|}}
|
2019-05-01 18:09:29 +00:00
|
|
|
{{#confirmation-dialog confirming=false index=index message="Are you sure you want to delete this Role?"}}
|
2020-01-15 09:15:54 +00:00
|
|
|
{{#block-slot name='action' as |confirm|}}
|
2019-05-01 18:09:29 +00:00
|
|
|
{{#action-group index=index onchange=(action change) checked=(if (eq checked index) 'checked')}}
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
<a data-test-edit href={{href-to 'dc.acls.roles.edit' item.ID}}>Edit</a>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<button type="button" class="type-delete" data-test-delete {{action confirm 'delete' item}}>Delete</button>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
{{/action-group}}
|
|
|
|
{{/block-slot}}
|
2020-01-15 09:15:54 +00:00
|
|
|
{{#block-slot name='dialog' as |execute cancel message name|}}
|
2019-05-01 18:09:29 +00:00
|
|
|
{{delete-confirmation message=message execute=execute cancel=cancel}}
|
|
|
|
{{/block-slot}}
|
|
|
|
{{/confirmation-dialog}}
|
|
|
|
{{/block-slot}}
|
|
|
|
{{/tabular-collection}}
|
|
|
|
{{/block-slot}}
|
2020-01-15 09:15:54 +00:00
|
|
|
{{#block-slot name='empty'}}
|
2019-05-01 18:09:29 +00:00
|
|
|
<p>
|
|
|
|
There are no Roles.
|
|
|
|
</p>
|
|
|
|
{{/block-slot}}
|
|
|
|
{{/changeable-set}}
|
|
|
|
{{/block-slot}}
|
|
|
|
{{/app-view}}
|