Refactored UserSession context functions#7100
Merged
Rwolfe-Nava merged 3 commits intomainfrom Oct 6, 2022
Merged
Conversation
changelog: Internal, General, Refactored inconsistent function names
aduth
reviewed
Oct 6, 2022
Co-authored-by: Andrew Duthie <andrew.duthie@gsa.gov>
n1zyy
approved these changes
Oct 6, 2022
Contributor
n1zyy
left a comment
There was a problem hiding this comment.
git praise shows @aduth and @mitchellhenke were the initial authors of this if you want their buy-in, but
from my perspective.
| end | ||
|
|
||
| def self.authentication_context?(context) | ||
| initial_authentication_context?(context) || reauthentication_context?(context) |
Contributor
There was a problem hiding this comment.
I forgot what a footgun this method was until you picked up this story. Thanks for fixing this!
aduth
approved these changes
Oct 6, 2022
Contributor
aduth
left a comment
There was a problem hiding this comment.
Looks like a nice improvement for clarity! 👍
jskinne3
pushed a commit
that referenced
this pull request
Oct 12, 2022
* Refactored UserSession context functions changelog: Internal, General, Refactored inconsistent function names * Update app/services/user_session_context.rb Co-authored-by: Andrew Duthie <andrew.duthie@gsa.gov> * lint fixes Co-authored-by: Andrew Duthie <andrew.duthie@gsa.gov>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
changelog: Internal, General, Refactored inconsistent function names
🎫 Ticket
LG-7324
🛠 Summary of changes
Refactored function names in user_session_context.rb that were a bit confusing.
reauthentication_context?andconfirmation_context?both check explicitly for the respective contexts. Intuitively, one would expectauthentication_context?to do the same, but it was checking either authentication or reauthentication. This renamesauthentication_context?andintiial_authentication_context?to more accurately describe what they are doing.