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: add warning before downloading secret data #23260

Merged
merged 9 commits into from
Sep 22, 2023

Conversation

hellobontempo
Copy link
Contributor

In #20431 we added the ability to download a secret value. To prevent accidentally downloading sensitive data, we've added a confirmation modal prompting users to cancel or proceed with the download.
Screenshot 2023-09-22 at 11 52 19 AM


🎥

download-confirm

@hellobontempo hellobontempo added this to the 1.14.4 milestone Sep 22, 2023
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Sep 22, 2023
@stringify={{true}}
aria-label="Download secret value"
{{on "click" (fn (mut this.modalOpen) false)}}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@zofskeez - There's a click event in the <DownloadButton> that handles the eventual download. It works fine locally but do you foresee any issue with stacking events like this?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be better to pass the action up from the handleDownload method in DownloadButton. Something like:

async handleDownload() {
  try {
    // download was a success
    if (this.args.onSuccess) {
      this.args.onSuccess();
    }
  } catch {}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes! That's what I was thinking 🤔 Will refactor!

@github-actions
Copy link

Build Results:
All builds succeeded! ✅

@github-actions
Copy link

CI Results:
All Go tests succeeded! ✅

Copy link
Contributor

@zofskeez zofskeez left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

@hellobontempo hellobontempo enabled auto-merge (squash) September 22, 2023 19:42

<div id="qunit"></div>
<div id="qunit-fixture">
<div id="ember-testing-container">
<div id="ember-testing"></div>
<div id="modal-wormhole"></div>
Copy link
Contributor

Choose a reason for hiding this comment

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

Yes! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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