* fix: 🐛 properly show username for oidc auth method in user menu * test: 💍 fix admin ui tests * test: 💍 fix desktop ui tests * refactor: 💡 admin to not store username in authenticated object * refactor: 💡 use getter in app controller * test: 💍 POC for how we could update our tests to use auth account * refactor: 💡 remove unused service * test: 💍 fix all tests in ui/admin * test: 💍 revert one change * refactor: 💡 update ui/desktop w/ feedback + fix tests * refactor: 💡 add in error handling * refactor: 💡 cleanup unused service * test: 💍 fix e2e test selector ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-17231
47 lines
1.1 KiB
Handlebars
47 lines
1.1 KiB
Handlebars
{{!
|
|
Copyright (c) HashiCorp, Inc.
|
|
SPDX-License-Identifier: BUSL-1.1
|
|
}}
|
|
|
|
<SettingsCard @header={{t 'resources.user.title'}} @icon='user'>
|
|
<:state>
|
|
{{#if this.isAuthenticated}}
|
|
<Hds::Badge
|
|
@text={{t 'states.authenticated'}}
|
|
@icon='check'
|
|
@color='success'
|
|
/>
|
|
{{else}}
|
|
<Hds::Badge @text={{t 'states.unauthenticated'}} @color='neutral' />
|
|
{{/if}}
|
|
</:state>
|
|
<:body>
|
|
<div>
|
|
<Hds::Text::Display>
|
|
{{t 'resources.auth-method.title'}}
|
|
</Hds::Text::Display>
|
|
<Hds::Text::Body @tag='p' @weight='medium' data-test-auth-method>
|
|
{{this.authMethod}}
|
|
</Hds::Text::Body>
|
|
</div>
|
|
<div>
|
|
<Hds::Text::Display>
|
|
{{t 'form.username.label'}}
|
|
</Hds::Text::Display>
|
|
<Hds::Text::Body @tag='p' @weight='medium' data-test-username>
|
|
{{this.session.username}}
|
|
</Hds::Text::Body>
|
|
</div>
|
|
</:body>
|
|
|
|
<:action>
|
|
<Hds::Button
|
|
data-test-settings-signout-btn
|
|
@text={{t 'actions.deauthenticate'}}
|
|
@color='critical'
|
|
@icon='sign-out'
|
|
@size='medium'
|
|
{{on 'click' @onSignout}}
|
|
/>
|
|
</:action>
|
|
</SettingsCard> |