Skip to content

LG-10014 [Bugfix] Password Reset Activates Any Profile#8537

Merged
eric-gade merged 3 commits intomainfrom
eric-lg-10014
Jun 6, 2023
Merged

LG-10014 [Bugfix] Password Reset Activates Any Profile#8537
eric-gade merged 3 commits intomainfrom
eric-lg-10014

Conversation

@eric-gade
Copy link
Contributor

🎫 Ticket

LG-10014

🛠 Summary of changes

Previously, any password reactivation was manually setting the profile to active in the database. This is a problem if the profile also has fraud and/or gpo pending. These changes include a new helper that uses the existing activate method which does the appropriate checks for all pending/deactivation reasons first.

New helper method will do proper checks to ensure that profile can
actually be activated

changelog: Bug Fixes, Profiles, Password reset profile activation bugfix
@eric-gade eric-gade requested a review from a team June 5, 2023 21:19

def activate_after_password_reset
update!(
deactivation_reason: nil,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we check here thatdeactivation_reason is password_reset before removing it?

Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

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

can we get some regression spec coverage for this?

@eric-gade eric-gade merged commit 3014caf into main Jun 6, 2023
@eric-gade eric-gade deleted the eric-lg-10014 branch June 6, 2023 13:29
@solipet solipet mentioned this pull request Jun 6, 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.

4 participants