2023-03-01 09:39:41 -06:00
|
|
|
{{!
|
|
|
|
|
Copyright (c) HashiCorp, Inc.
|
|
|
|
|
SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
}}
|
|
|
|
|
|
2021-06-01 22:29:19 -04:00
|
|
|
{{#if @model.isOIDC}}
|
|
|
|
|
<Rose::Dropdown
|
2022-11-23 14:40:07 -05:00
|
|
|
@text={{t (concat 'states.' @model.state)}}
|
2021-06-03 17:08:40 -04:00
|
|
|
@icon={{if
|
|
|
|
|
@model.isInactive
|
2021-09-16 14:03:26 -07:00
|
|
|
'flight-icons/svg/x-circle-16'
|
2021-08-25 10:52:20 -04:00
|
|
|
(if
|
2021-09-16 14:03:26 -07:00
|
|
|
@model.isPrivate
|
|
|
|
|
'flight-icons/svg/lock-16'
|
|
|
|
|
'flight-icons/svg/check-circle-16'
|
2021-08-25 10:52:20 -04:00
|
|
|
)
|
2021-06-03 17:08:40 -04:00
|
|
|
}}
|
2021-06-01 22:29:19 -04:00
|
|
|
@dropdownRight={{true}}
|
|
|
|
|
as |dropdown|
|
|
|
|
|
>
|
2021-06-03 17:08:40 -04:00
|
|
|
<dropdown.section @title={{t 'actions.change-state'}}>
|
2021-06-01 22:29:19 -04:00
|
|
|
<Rose::Form as |form|>
|
|
|
|
|
<form.radioGroup
|
|
|
|
|
@name='theme'
|
2022-11-23 14:40:07 -05:00
|
|
|
@selectedValue={{@model.state}}
|
2021-06-01 22:29:19 -04:00
|
|
|
@changed={{route-action 'changeState'}}
|
|
|
|
|
as |radioGroup|
|
|
|
|
|
>
|
2022-01-14 16:56:59 -05:00
|
|
|
{{#each @model.options.oidc.state as |state|}}
|
2021-06-01 22:29:19 -04:00
|
|
|
<dropdown.item>
|
|
|
|
|
<radioGroup.radio
|
2021-06-03 17:08:40 -04:00
|
|
|
@label={{t (concat 'states.' state)}}
|
2021-06-01 22:29:19 -04:00
|
|
|
@value={{state}}
|
|
|
|
|
/>
|
|
|
|
|
</dropdown.item>
|
|
|
|
|
{{/each}}
|
|
|
|
|
</form.radioGroup>
|
|
|
|
|
</Rose::Form>
|
|
|
|
|
</dropdown.section>
|
|
|
|
|
</Rose::Dropdown>
|
|
|
|
|
{{/if}}
|
|
|
|
|
|
2021-05-11 14:13:24 -04:00
|
|
|
<Rose::Dropdown
|
2022-09-07 16:21:27 -04:00
|
|
|
@text={{t 'actions.manage'}}
|
2021-05-11 14:13:24 -04:00
|
|
|
@dropdownRight={{true}}
|
|
|
|
|
as |dropdown|
|
|
|
|
|
>
|
2022-08-11 15:37:44 -07:00
|
|
|
{{#if @model.isPrimary}}
|
|
|
|
|
<dropdown.button
|
|
|
|
|
@disabled={{@model.canSave}}
|
|
|
|
|
{{on 'click' (route-action 'removeAsPrimary' @model)}}
|
|
|
|
|
>
|
|
|
|
|
{{t 'resources.auth-method.actions.remove-as-primary'}}
|
|
|
|
|
</dropdown.button>
|
|
|
|
|
{{else}}
|
|
|
|
|
<dropdown.button
|
|
|
|
|
@disabled={{@model.canSave}}
|
|
|
|
|
{{on 'click' (route-action 'makePrimary' @model)}}
|
|
|
|
|
>
|
|
|
|
|
{{t 'resources.auth-method.actions.make-primary'}}
|
|
|
|
|
</dropdown.button>
|
2021-03-26 12:47:49 -04:00
|
|
|
{{/if}}
|
2022-01-31 12:02:37 -05:00
|
|
|
{{#if (can 'create model' @model collection='accounts')}}
|
2021-09-03 10:22:54 -07:00
|
|
|
|
|
|
|
|
<dropdown.link
|
|
|
|
|
@route='scopes.scope.auth-methods.auth-method.accounts.new'
|
|
|
|
|
@model={{@model}}
|
|
|
|
|
>
|
|
|
|
|
{{t 'resources.account.actions.create'}}
|
|
|
|
|
</dropdown.link>
|
|
|
|
|
{{/if}}
|
|
|
|
|
|
2022-08-12 09:27:02 -07:00
|
|
|
{{#if (can 'create model' @model collection='managed-groups')}}
|
|
|
|
|
{{#if @model.isOIDC}}
|
|
|
|
|
<dropdown.link
|
|
|
|
|
@route='scopes.scope.auth-methods.auth-method.managed-groups.new'
|
|
|
|
|
@model={{@model}}
|
|
|
|
|
>
|
|
|
|
|
{{t 'resources.managed-group.actions.create'}}
|
|
|
|
|
</dropdown.link>
|
2021-11-10 07:32:40 -08:00
|
|
|
{{/if}}
|
|
|
|
|
{{/if}}
|
|
|
|
|
|
2023-05-22 15:46:13 -07:00
|
|
|
{{#if (can 'delete auth-method' @model)}}
|
2021-08-16 13:31:28 -07:00
|
|
|
<dropdown.separator />
|
|
|
|
|
<dropdown.button
|
|
|
|
|
@style='danger'
|
|
|
|
|
@disabled={{@model.canSave}}
|
|
|
|
|
{{on 'click' (route-action 'delete' @model)}}
|
|
|
|
|
>
|
|
|
|
|
{{t 'resources.auth-method.actions.delete'}}
|
|
|
|
|
</dropdown.button>
|
|
|
|
|
{{/if}}
|
2022-10-06 11:41:12 -04:00
|
|
|
</Rose::Dropdown>
|