-
Notifications
You must be signed in to change notification settings - Fork 166
LG-13014: Implement password compromised #10861
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
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
b9ac0b4
changelog: Upcoming Features, Authentication, let users who's passwor…
mdiarra3 b9a05ed
add password compromised spec and edit objects
mdiarra3 d4e032f
sign in spec updated
mdiarra3 9b4d476
change to use user_password_params
mdiarra3 a858e41
Merge remote-tracking branch 'origin/main' into LG-13014-implement-pa…
mdiarra3 9e60712
address comments
mdiarra3 4b4fed0
Merge remote-tracking branch 'origin/main' into LG-13014-implement-pa…
mdiarra3 556a3d8
change up to use password controller
mdiarra3 ada95a2
password compromised updates
mdiarra3 f0df22e
fix lint and use global variable
mdiarra3 d9dfe06
update edit spec and global variable
mdiarra3 ffba90b
fix the sign in spec
mdiarra3 93911fe
fix form spec
mdiarra3 14fdbbe
address comments, update test to better redirect
mdiarra3 a5893a0
remove former check
mdiarra3 96a02e0
make sure invalid password method is correct
mdiarra3 13cfe98
Update to make aria described conditional
mdiarra3 0b27511
Merge remote-tracking branch 'origin/main' into LG-13014-implement-pa…
mdiarra3 6baa426
update specs and use hash format for attributes instead of positional…
mdiarra3 a5a68a3
fix reset password form spec
mdiarra3 db4182d
remove conditional for password strength description
mdiarra3 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # frozen_string_literal: true | ||
|
|
||
| class UpdatePasswordPresenter | ||
| attr_reader :user, :required_password_change | ||
aduth marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| alias_method :required_password_change?, :required_password_change | ||
| def initialize(user:, required_password_change: false) | ||
| @user = user | ||
| @required_password_change = required_password_change | ||
| end | ||
|
|
||
| def forbidden_passwords | ||
| user.email_addresses.flat_map do |email_address| | ||
| ForbiddenPasswords.new(email_address.email).call | ||
| end.uniq | ||
| end | ||
|
|
||
| def aria_described_by_if_eligible | ||
| return {} if required_password_change? | ||
|
Comment on lines
+18
to
+19
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since we render the description for all views, do we need this condition anymore, or should we just always apply the |
||
| { | ||
| input_html: { | ||
| aria: { describedby: 'password-description' }, | ||
| }, | ||
| } | ||
| end | ||
|
|
||
| def submit_text | ||
| if required_password_change? | ||
| I18n.t('forms.passwords.edit.buttons.submit') | ||
| else | ||
| I18n.t('forms.buttons.submit.update') | ||
| end | ||
| end | ||
| end | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.