Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI: Allow userpass user to update their own password #23797

Merged
merged 14 commits into from
Oct 24, 2023

Conversation

hashishaw
Copy link
Contributor

@hashishaw hashishaw commented Oct 23, 2023

Allows a userpass user to reset their own password, using the update password API.

New page, and link in user dropdown:

New reset password page

Page and dropdown if user does not have a userpass auth mount:

Screenshot 2023-10-23 at 4 59 35 PM

Error handling on page:

Screenshot 2023-10-23 at 5 00 07 PM

@hashishaw hashishaw added this to the 1.16.0-rc1 milestone Oct 23, 2023
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Oct 23, 2023
@hashishaw hashishaw marked this pull request as ready for review October 23, 2023 22:20
@github-actions
Copy link

Build Results:
All builds succeeded! ✅

@icon={{if this.updatePassword.isRunning "loading"}}
type="submit"
data-test-reset-password-save
/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know users navigate here from the dropdown, but would it be helpful to add a Cancel button that brings you back to the dashboard or auth method details?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't add it because I wasn't sure where we would redirect the user back to. There are a few other forms like this that do not have a cancel button, and I figured they could get to wherever they wanted to be with the side nav.

<div class="box is-sideless is-fullwidth is-marginless">
<Hds::Alert @type="inline" @color="success" data-test-reset-password-success as |A|>
<A.Title>Password set successfully</A.Title>
<A.Button @text="Reset form" @color="secondary" {{on "click" this.reset}} data-test-reset-reset-password />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking about reset password forms I've used - I'd expect an alert to render that it was successful above the form. It feels like we don't need to include a Reset form button + action to conditionally render the form.

But perhaps you had other reasons for doing so! Just a small comment about the UX here

</p.levelLeft>
</PageHeader>

<EmptyState @title="No password reset access" @message={{@this.model.message}}>
Copy link
Contributor

@hellobontempo hellobontempo Oct 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like an extra @ here

Suggested change
<EmptyState @title="No password reset access" @message={{@this.model.message}}>
<EmptyState @title="No password reset access" @message={{this.model.message}}>

Copy link
Contributor

@hellobontempo hellobontempo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job! This is long overdue and I'm excited to finally have this functionality in the UI! 🎉 A couple of comments/questions, nothing major - except perhaps the minor template arg typo @this.type..

@hashishaw hashishaw enabled auto-merge (squash) October 24, 2023 16:43
@hashishaw hashishaw force-pushed the ui/VAULT-2284/userpass-password-self-update branch from f6cfdad to 7536f1b Compare October 24, 2023 19:03
@hashishaw hashishaw merged commit b770887 into main Oct 24, 2023
@hashishaw hashishaw deleted the ui/VAULT-2284/userpass-password-self-update branch October 24, 2023 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants