* fix: 🐛 hide manage button if no action items ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-17393 * fix: 🐛 update manage actions for credential-stores ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-17393 * fix: 🐛 update manage actions for groups ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-17393 * fix: 🐛 update manage actions for host-sets ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-17393 * fix: 🐛 update manage actions for roles ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-17393 * fix: 🐛 update manage action for targets ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-17393 * fix: 🐛 update manage actions for workers ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-17393 * fix: 🐛 update manage actions for users ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-17393 * fix: 🐛 update manage actions for auth-methods ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-17393
35 lines
972 B
Handlebars
35 lines
972 B
Handlebars
{{!
|
|
Copyright (c) HashiCorp, Inc.
|
|
SPDX-License-Identifier: BUSL-1.1
|
|
}}
|
|
|
|
{{#let
|
|
(hash
|
|
canAddAccounts=(can 'addAccounts user' @model)
|
|
canDelete=(can 'delete model' @model)
|
|
)
|
|
as |perms|
|
|
}}
|
|
{{#if (or perms.canAddAccounts perms.canDelete)}}
|
|
<Hds::Dropdown data-test-manage-user-dropdown as |dd|>
|
|
<dd.ToggleButton @text={{t 'actions.manage'}} @color='secondary' />
|
|
{{#if perms.canAddAccounts}}
|
|
<dd.Interactive @route='scopes.scope.users.user.add-accounts'>
|
|
{{t 'resources.user.actions.add-accounts'}}
|
|
</dd.Interactive>
|
|
{{/if}}
|
|
{{#if perms.canDelete}}
|
|
{{#if perms.canAddAccounts}}
|
|
<dd.Separator />
|
|
{{/if}}
|
|
<dd.Interactive
|
|
@color='critical'
|
|
@disabled={{@model.canSave}}
|
|
{{on 'click' (fn @delete @model)}}
|
|
>
|
|
{{t 'resources.user.actions.delete'}}
|
|
</dd.Interactive>
|
|
{{/if}}
|
|
</Hds::Dropdown>
|
|
{{/if}}
|
|
{{/let}} |