Skip to content

LG-361 New LOA1 Cancel Flow#2678

Merged
stevegsa merged 12 commits intomasterfrom
stevegsa-loa1-cancel-flow
Dec 3, 2018
Merged

LG-361 New LOA1 Cancel Flow#2678
stevegsa merged 12 commits intomasterfrom
stevegsa-loa1-cancel-flow

Conversation

@stevegsa
Copy link
Contributor

Why: To make the style more consistent with the rest of the site and move away from modal popups.

How: Create new routes for user registration cancellation. Update the cancel partial that triggered the javascript popup and replace the links to point to the new page. Add a new tracking event.

Hi! Before submitting your PR for review, and/or before merging it, please
go through the checklists below. These represent the more critical elements
of our code quality guidelines. The rest of the list can be found in
CONTRIBUTING.md

Controllers

  • When adding a new controller that requires the user to be fully
    authenticated, make sure to add before_action :confirm_two_factor_authenticated
    as the first callback.

Database

  • Unsafe migrations are implemented over several PRs and over several
    deploys to avoid production errors. The strong_migrations gem
    will warn you about unsafe migrations and has great step-by-step instructions
    for various scenarios.

  • Indexes were added if necessary. This article provides a good overview
    of indexes in Rails.

  • Verified that the changes don't affect other apps (such as the dashboard)

  • When relevant, a rake task is created to populate the necessary DB columns
    in the various environments right before deploying, taking into account the users
    who might not have interacted with this column yet (such as users who have not
    set a password yet)

  • Migrations against existing tables have been tested against a copy of the
    production database. See LG-228 Make migrations safer and more resilient #2127 for an example when a migration caused deployment
    issues. In that case, all the migration did was add a new column and an index to
    the Users table, which might seem innocuous.

Encryption

  • The changes are compatible with data that was encrypted with the old code.

Routes

  • GET requests are not vulnerable to CSRF attacks (i.e. they don't change
    state or result in destructive behavior).

Session

  • When adding user data to the session, use the user_session helper
    instead of the session helper so the data does not persist beyond the user's
    session.

Testing

  • Tests added for this feature/bug
  • Prefer feature/integration specs over controller specs
  • When adding code that reads data, write tests for nil values, empty strings,
    and invalid inputs.

@stevegsa
Copy link
Contributor Author

Screenshots:

screen shot 2018-11-29 at 10 39 27 pm

**Why**: To make the style more consistent with the rest of the site and move away from modal popups.

**How**: Create new routes for user registration cancellation.  Update the cancel partial that triggered the javascript popup and replace the links to point to the new page.  Add a new tracking event.
@stevegsa stevegsa force-pushed the stevegsa-loa1-cancel-flow branch from 7a2ebce to 8ccd009 Compare December 2, 2018 06:12
@@ -1,4 +1,6 @@
class UsersController < ApplicationController
Copy link
Contributor

@jmhooper jmhooper Dec 3, 2018

Choose a reason for hiding this comment

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

Unrelated to this change, but worth noting that moving this into the account reset namespace may be a good refactor. Confusing to have this controller out here, makes you think this is the controller for the "delete account" button on the account page.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I'm misreading this. This is actually for cancelling during account setup, ignore the above

end

def ensure_in_setup
redirect_to root_url if !session[:user_confirmation_token] && two_factor_enabled
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we checking for the user confirmation token in the session? What happens if we remove that here?

Copy link
Contributor Author

@stevegsa stevegsa Dec 3, 2018

Choose a reason for hiding this comment

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

two_factor_enabled needs to have a user but in the password screen it won't have one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(password setup)

Copy link
Contributor

Choose a reason for hiding this comment

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

I finally figured this out and posted some suggestions that may make this easier to follow in Slack. Those are take it or leave it though.

jmhooper
jmhooper previously approved these changes Dec 3, 2018
@jmhooper jmhooper dismissed their stale review December 3, 2018 18:13

One last check on IdV stuff

end

context 'with js', js: true do
context 'sp loa1' do
Copy link
Contributor

Choose a reason for hiding this comment

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

Good riddance

@stevegsa stevegsa merged commit a1e9f1a into master Dec 3, 2018
@amathews-fs amathews-fs deleted the stevegsa-loa1-cancel-flow branch January 7, 2021 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants