mirror of https://github.com/status-im/consul.git
50 lines
1.4 KiB
Handlebars
50 lines
1.4 KiB
Handlebars
|
{{#let (policy/group item.Policies) as |policies|}}
|
||
|
{{#let (get policies 'management') as |management|}}
|
||
|
{{#if (gt management.length 0)}}
|
||
|
<dl>
|
||
|
<dt>
|
||
|
Management
|
||
|
</dt>
|
||
|
<dd>
|
||
|
{{#each (get policies 'management') as |item|}}
|
||
|
<span data-test-policy class={{policy/typeof item}}>{{item.Name}}</span>
|
||
|
{{/each}}
|
||
|
</dd>
|
||
|
</dl>
|
||
|
{{/if}}
|
||
|
{{/let}}
|
||
|
{{#let (get policies 'identities') as |identities|}}
|
||
|
{{#if (gt identities.length 0)}}
|
||
|
<dl>
|
||
|
<dt>Identities</dt>
|
||
|
<dd>
|
||
|
{{#each identities as |item|}}
|
||
|
<span data-test-policy class={{policy/typeof item}}>{{item.Name}}</span>
|
||
|
{{/each}}
|
||
|
</dd>
|
||
|
</dl>
|
||
|
{{/if}}
|
||
|
{{/let}}
|
||
|
{{#if (token/is-legacy item) }}
|
||
|
<dl>
|
||
|
<dt>Rules</dt>
|
||
|
<dd>
|
||
|
Legacy tokens have embedded rules.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
{{else}}
|
||
|
{{#let (append (get policies 'policies') (or item.Roles (array))) as |policies|}}
|
||
|
{{#if (gt policies.length 0)}}
|
||
|
<dl>
|
||
|
<dt>Rules</dt>
|
||
|
<dd>
|
||
|
{{#each policies as |item|}}
|
||
|
<span data-test-policy class={{policy/typeof item}}>{{item.Name}}</span>
|
||
|
{{/each}}
|
||
|
</dd>
|
||
|
</dl>
|
||
|
{{/if}}
|
||
|
{{/let}}
|
||
|
{{/if}}
|
||
|
{{/let}}
|