zulip/zerver
Greg Price 0ec2a9d259 auth: Try switching to register even if user exists on another realm.
For example, this means that if a user already has an account on one
realm and they try to make an account on another by hitting "Sign in
with Google" (rather than following the little "Register" link to a
"Sign up with Google" button instead), they'll get to make an account
instead of getting an error.

Until very recently, if the user existed on another realm, any attempt
to register with that email address had to fail in the end, so this
logic gave the user a useful error message early.  We introduced it in
c23aaa178 "GitHub: Show error on login page for wrong subdomain"
back in 2016-10 for that purpose.  No longer!  We now support reusing
an email on multiple realms, so we let the user proceed instead.

This function's interface is kind of confusing, but I believe when its
callers use it properly, `invalid_subdomain` should only ever be true
when `user_profile` is None -- in which case the revised
`invalid_subdomain` condition in this commit can never actually fire,
and the `invalid_subdomain` parameter no longer has any effect.  (At
least some unit tests call this function improperly in that respect.)
I've kept this commit to a minimal change, but it would be a good
followup to go through the call sites, verify that, eliminate the use
of `invalid_subdomain`, then remove it from the function entirely.
2017-11-28 16:38:41 -08:00
..
fixtures markdown: Hide URL if message is only an image. 2017-11-27 13:30:18 -08:00
lib auth: Allow accounts with the same email in different realms. 2017-11-28 16:23:10 -08:00
management requirements: Upgrade mypy to 0.550. 2017-11-25 10:06:27 -08:00
migrations auth: Allow accounts with the same email in different realms. 2017-11-28 16:23:10 -08:00
templatetags markdown processor: Exclude some files from macro substitution. 2017-11-22 10:29:07 -08:00
tests auth: Try switching to register even if user exists on another realm. 2017-11-28 16:38:41 -08:00
tornado queue processor tests: Call consume by default. 2017-11-26 11:45:34 -08:00
views auth: Try switching to register even if user exists on another realm. 2017-11-28 16:38:41 -08:00
webhooks integrations: Add topic parameter for Appfollow. 2017-11-28 15:49:19 -08:00
worker python-zulip-api: Upgrade to PyPI package release 0.3.8. 2017-11-27 20:31:37 -08:00
__init__.py
apps.py python: Sort imports in easy files in zerver/. 2017-11-15 15:50:28 -08:00
context_processors.py settings: Remove ABOUT_LINK_DISABLED. 2017-11-16 21:15:24 -08:00
decorator.py Don't use force_bytes() in decorator.py. 2017-11-09 10:43:19 -08:00
filters.py python: Sort imports in easy files in zerver/. 2017-11-15 15:50:28 -08:00
forms.py auth: Replace user_email_is_unique validator. 2017-11-28 16:23:10 -08:00
logging_handlers.py queue processor tests: Call consume by default. 2017-11-26 11:45:34 -08:00
middleware.py debug: Add facility to dump tracemalloc snapshots. 2017-11-28 15:52:07 -08:00
models.py auth: Allow accounts with the same email in different realms. 2017-11-28 16:23:10 -08:00
signals.py email: Fix identification of chrome as safari on ios 2017-11-19 17:07:33 -08:00
static_header.txt
storage.py docs: Update links from codebase to point to ReadTheDocs. 2017-11-16 10:53:49 -08:00