zulip/zerver
Rishi Gupta 326f9a8506 email: Fix zephyr mirror registration email not working with subdomains.
If a user is trying to register for a mit zephyr mirroring realm, we send
them a specific registration email with a link to a few more instructions.

There is only one server that we know about that has such a realm, and that
server uses subdomains. This commit changes the logic to work in the
subdomains case, rather than in the non-subdomains case (though see next
para).

Note that the current check is deceptive, and is not actually correct in the
non-subdomains case. The prereg user has a realm only in the atypical case
of someone registering via the special URL for completely-open realms.

To do this correctly in the non-subdomains case, we would need to copy a
bunch of the logic from the beginning of accounts_register to figure out
which realm the user is signing up for, so that we can check if that realm
is a zephyr mirroring realm. Given how complicated the registration code is
already, I think it is probably not worth it at the moment. This commit also
removes the partial (deceptive) check, since I think it does more harm than
good.
2017-05-03 20:52:24 -07:00
..
fixtures webhooks: Move all fixtures to zerver/webhooks/<webhook_name>/fixtures. 2017-04-28 11:07:03 -07:00
lib confirmation: Replace *_template_path arguments with template_prefix. 2017-05-03 20:44:57 -07:00
management realm_domains: Restructure library for getting realm domains. 2017-04-28 21:11:56 -07:00
migrations Outgoing Webhook System: Add Service model. 2017-05-02 08:20:31 -07:00
outgoing_webhooks Outgoing Webhook System: Add zerver/outgoing_webhooks. 2017-05-02 08:20:31 -07:00
templatetags render_markdown_path: Remove unnecessary and broken caching. 2017-04-12 20:29:04 -07:00
tests email: Fix zephyr mirror registration email not working with subdomains. 2017-05-03 20:52:24 -07:00
tornado decorator: Add support for Django internal_notify_view. 2017-04-18 09:59:07 -07:00
views email: Fix zephyr mirror registration email not working with subdomains. 2017-05-03 20:52:24 -07:00
webhooks zerver/decorator: Set request.client in api_key_only_webhook_view. 2017-05-01 23:44:07 -07:00
worker Outgoing Webhook System: Check for @-mentioned outgoing webhook bots. 2017-05-02 09:22:04 -07:00
__init__.py caching: Add configuration class for post-migration cache flushing. 2016-10-27 23:26:34 -07:00
apps.py Add notifications on new logins to Zulip. 2017-03-25 16:50:52 -07:00
context_processors.py context_processors: Clean up logic for fetching realm. 2017-05-03 16:39:31 -07:00
decorator.py zerver/decorator: Set request.client in api_key_only_webhook_view. 2017-05-01 23:44:07 -07:00
exceptions.py Annotate zerver.exceptions, zerver.filters, zerver.logging_handlers. 2016-06-04 22:51:18 -07:00
filters.py mypy: Added Dict, List and Set imports. 2017-03-04 14:33:44 -08:00
forms.py reset_password: Modify password reset email if email is in wrong realm. 2017-04-24 21:58:29 -07:00
logging_handlers.py logging_handlers: Fix tracebacks being emailed in subject lines. 2017-04-25 18:55:11 -07:00
middleware.py Add notifications on new logins to Zulip. 2017-03-25 16:50:52 -07:00
models.py Outgoing Webhook System: Add Service model. 2017-05-02 08:20:31 -07:00
signals.py Replace timezone.get_current_timezone_name with timezone_get_current_timezone_name. 2017-04-16 12:28:56 -07:00
static_header.txt Update static_header.txt with new license information. 2016-08-13 00:37:21 -07:00
storage.py docs: Add discussion of VFL to front-end-build-process.md. 2017-03-04 21:14:17 -08:00