Skip to content

LG-10235: Hide skip MFA after adding F/T#8739

Merged
jc-gsa merged 7 commits intomainfrom
LG-10235-hide-ft-skip
Jul 12, 2023
Merged

LG-10235: Hide skip MFA after adding F/T#8739
jc-gsa merged 7 commits intomainfrom
LG-10235-hide-ft-skip

Conversation

@jc-gsa
Copy link
Contributor

@jc-gsa jc-gsa commented Jul 10, 2023

🎫 Ticket

LG-10235

🛠 Summary of changes

Please see associated Figma file for expected behavior.

jc-gsa added 4 commits July 7, 2023 16:02
changelog: User-facing improvements, Authentication, Conditionally remove skip add mfa link
@jc-gsa jc-gsa requested a review from a team July 10, 2023 16:31
Copy link
Contributor

@aduth aduth left a comment

Choose a reason for hiding this comment

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

This should also include hiding the link on the following screen with the 2nd MFA selection.

end
end

describe '#show_skip_additonal_mfa_link?' do
Copy link
Contributor

Choose a reason for hiding this comment

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

  • Minor: Typo on "additonal" (should be "additional")
  • Since this is implemented in the concern, can we create a concern spec file with one set of tests rather than implementing the tests across all controllers which use the concern?

attr_reader :mfa_context

def initialize(mfa_context:, show_skip_additonal_mfa_link: true)
@mfa_context = mfa_context
Copy link
Contributor

Choose a reason for hiding this comment

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

It doesn't appear we use the MFA context on the presenter? Should it be removed?

Alternatively, we could move the logic for show_skip_additonal_mfa_link? into the presenter?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's a trade off between defining the logic of the function show_skip_additional_mfa_link? once or duplicating the logic in the following two files:

app/presenters/mfa_confirmation_presenter.rb
app/presenters/two_factor_options_presenter.rb

Presently the logic is defined in one location (controllers/concerns/mfa_setup_concern.rb). I'm not-so-attached to either style.

The unnecessary mfa_context has been removed and was left over from a change in style.

@jc-gsa jc-gsa force-pushed the LG-10235-hide-ft-skip branch from 339f97e to 5d2cb09 Compare July 11, 2023 20:59
@jc-gsa jc-gsa force-pushed the LG-10235-hide-ft-skip branch from 5d2cb09 to 5518016 Compare July 11, 2023 21:19
Copy link
Contributor

@aduth aduth left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Comment on lines -6 to +10
def initialize(user_agent:, user: nil,
phishing_resistant_required: false, piv_cac_required: false)
def initialize(user_agent:,
user: nil,
phishing_resistant_required: false,
piv_cac_required: false,
show_skip_additional_mfa_link: true)
Copy link
Contributor

Choose a reason for hiding this comment

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

Much more readable as one-per-line 👍

@jc-gsa jc-gsa merged commit 66d58b5 into main Jul 12, 2023
@jc-gsa jc-gsa deleted the LG-10235-hide-ft-skip branch July 12, 2023 22:09
@aduth aduth mentioned this pull request Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants