Only display regenerate token when peer is dialer

Regenerating only makes sense if we are dealing with the
side that created  the token - i.e. the dialer.
This commit is contained in:
Michael Klein 2022-10-05 12:05:03 +02:00
parent b6384d9ffa
commit 686e0f5ad4
1 changed files with 3 additions and 6 deletions

View File

@ -41,14 +41,11 @@ as |item index|>
</div>
</BlockSlot>
<BlockSlot @name="actions" as |Actions|>
{{#if (can 'delete peer' item=item)}}
{{#if (can "delete peer" item=item)}}
<Actions as |Action|>
{{#if (can "write peer" item=item)}}
<Action
data-test-regenerate-action
{{on 'click' (fn @onedit item)}}
>
{{#if (and (can "write peer" item=item) item.isDialer)}}
<Action data-test-regenerate-action {{on "click" (fn @onedit item)}}>
<BlockSlot @name="label">
Regenerate token
</BlockSlot>