2020-01-28 14:25:52 +00:00
|
|
|
{{#if isAuthorized }}
|
|
|
|
{{#if create }}
|
2020-11-18 11:11:30 +00:00
|
|
|
{{page-title 'New Policy'}}
|
2020-01-28 14:25:52 +00:00
|
|
|
{{else}}
|
2020-11-18 11:11:30 +00:00
|
|
|
{{page-title 'Edit Policy'}}
|
2020-01-28 14:25:52 +00:00
|
|
|
{{/if}}
|
|
|
|
{{else}}
|
2020-11-18 11:11:30 +00:00
|
|
|
{{page-title 'Access Controls'}}
|
2020-01-28 14:25:52 +00:00
|
|
|
{{/if}}
|
2020-04-08 17:03:18 +00:00
|
|
|
<AppView
|
|
|
|
@authorized={{isAuthorized}}
|
|
|
|
@enabled={{isEnabled}}
|
|
|
|
>
|
2020-05-19 16:18:04 +00:00
|
|
|
<BlockSlot @name="notification" as |status type item error|>
|
2020-10-19 16:31:01 +00:00
|
|
|
<Consul::Policy::Notifications
|
|
|
|
@type={{type}}
|
|
|
|
@status={{status}}
|
|
|
|
@item={{item}}
|
|
|
|
@error={{error}}
|
|
|
|
/>
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="breadcrumbs">
|
2018-10-19 15:17:02 +00:00
|
|
|
<ol>
|
|
|
|
<li><a data-test-back href={{href-to 'dc.acls.policies'}}>All Policies</a></li>
|
|
|
|
</ol>
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="header">
|
2018-10-19 15:17:02 +00:00
|
|
|
<h1>
|
|
|
|
{{#if isAuthorized }}
|
|
|
|
{{#if create }}
|
|
|
|
New Policy
|
|
|
|
{{else}}
|
2021-03-11 09:29:11 +00:00
|
|
|
{{#if (can "write policy" item=item)}}
|
2018-10-19 15:17:02 +00:00
|
|
|
Edit Policy
|
2021-03-11 09:29:11 +00:00
|
|
|
{{else}}
|
|
|
|
View Policy
|
2018-10-19 15:17:02 +00:00
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
|
|
|
{{else}}
|
|
|
|
Access Controls
|
|
|
|
{{/if}}
|
|
|
|
</h1>
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="content">
|
2020-11-30 14:42:57 +00:00
|
|
|
{{#if (not create) }}
|
|
|
|
<div class="definition-table">
|
|
|
|
<dl>
|
|
|
|
<dt>Policy ID</dt>
|
|
|
|
<dd>
|
|
|
|
<CopyButton @value={{item.ID}} @name="Policy ID" @position="top-start" /> {{item.ID}}
|
|
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2019-05-01 18:09:29 +00:00
|
|
|
{{#if (eq (policy/typeof item) 'policy-management')}}
|
2018-10-19 15:17:02 +00:00
|
|
|
{{ partial 'dc/acls/policies/view'}}
|
|
|
|
{{else}}
|
|
|
|
{{ partial 'dc/acls/policies/form'}}
|
|
|
|
{{/if}}
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
</AppView>
|