Skip to content
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

Add config option for disabling email MX check #15280

Merged
merged 8 commits into from
Jan 13, 2020

Conversation

skgsergio
Copy link

This PR adds the option for disabling the MX check over the user email when a user tries to register.

This is required in some environments without Internet connectivity.

Copy link
Contributor

@gonzaloriestra gonzaloriestra left a comment

Choose a reason for hiding this comment

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

👌

config/app_config.yml.sample Outdated Show resolved Hide resolved
Co-Authored-By: Gonzalo Riestra <gonzalor@carto.com>
@skgsergio
Copy link
Author

How to CR

Since in staging we check the mail also in central the best way to check this is working is the following:

$ RAILS_ENV=staging BUILDER_ENABLED=true SUBDOMAIN=thisshouldwork PASSWORD=thisshouldwork12345 EMAIL=sconde+test@carto.com bundle exec rake cartodb:db:setup_user
User thisshouldwork created successfully

$ RAILS_ENV=staging BUILDER_ENABLED=true SUBDOMAIN=patatasfritas PASSWORD=patatasfritas12345 EMAIL=test@carto.lan bundle exec rake cartodb:db:setup_user
rake aborted!
{:email=>["Domain name not registered"]}

Tasks: TOP => cartodb:db:setup_user
(See full trace by running task with --trace)

Then add disable_email_mx_check: false to the config and restart both unicorn and resque and test again, you should get the same results:

$ RAILS_ENV=staging BUILDER_ENABLED=true SUBDOMAIN=thisshouldwork2 PASSWORD=thisshouldwork12345 EMAIL=sconde+test2@carto.com bundle exec rake cartodb:db:setup_user
User thisshouldwork2 created successfully

$ RAILS_ENV=staging BUILDER_ENABLED=true SUBDOMAIN=patatasfritas PASSWORD=patatasfritas12345 EMAIL=test@carto.lan bundle exec rake cartodb:db:setup_user
rake aborted!
{:email=>["Domain name not registered"]}

Tasks: TOP => cartodb:db:setup_user
(See full trace by running task with --trace)

And then change it to disable_email_mx_check: true:

$ RAILS_ENV=staging BUILDER_ENABLED=true SUBDOMAIN=thisshouldwork3 PASSWORD=thisshouldwork12345 EMAIL=sconde+test3@carto.com bundle exec rake cartodb:db:setup_user
User thisshouldwork3 created successfully

$ RAILS_ENV=staging BUILDER_ENABLED=true SUBDOMAIN=patatasfritas PASSWORD=patatasfritas12345 EMAIL=test@carto.lan bundle exec rake cartodb:db:setup_user
User patatasfritas created successfully

@gonzaloriestra
Copy link
Contributor

✔️ Acceptance OK

@skgsergio sorry for the delay 🙈

@gonzaloriestra
Copy link
Contributor

retest this please

3 similar comments
@gonzaloriestra
Copy link
Contributor

retest this please

@gonzaloriestra
Copy link
Contributor

retest this please

@gonzaloriestra
Copy link
Contributor

retest this please

@gonzaloriestra gonzaloriestra merged commit 10b787a into master Jan 13, 2020
@gonzaloriestra gonzaloriestra deleted the make-email-host-validation-configurable branch January 13, 2020 12:35
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