zulip/zerver/views
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
..
__init__.py views: Rename __init__.py to zerver.views.registration. 2017-01-08 16:21:15 -08:00
alert_words.py alert_words: Avoid redundant .lstrip(). 2017-02-28 10:13:03 -08:00
attachments.py Add support for managing and deleting attachments. 2017-02-16 23:44:44 -08:00
auth.py auth: Add new route to get server settings. 2017-05-03 16:40:14 -07:00
compatibility.py mobile: Add an endpoint for checking compatibility. 2017-02-03 09:55:34 -08:00
custom_profile_fields.py profile: Support custom profile data. 2017-04-18 15:20:59 -07:00
email_mirror.py email mirror: Fix mypy annotation error. 2017-04-24 22:01:48 -07:00
events_register.py events: Add support for fetch_event_types option to events_register. 2017-04-26 16:02:40 -07:00
home.py home.py: move initial_pointer as pointer to register_ret. 2017-04-28 23:39:14 -07:00
hotspots.py hotspots: Add backend support for tutorial hotspots. 2017-03-29 11:34:32 -07:00
integrations.py integrations: Pass context to integration objects. 2017-04-07 15:52:15 -07:00
invite.py signups: Use topic string_id for internal messages from new user signups. 2017-03-13 10:00:41 -07:00
messages.py streams: Ban null character from stream name. 2017-05-01 23:43:01 -07:00
muting.py Implemented API routes for muting/unmuting a topic 2017-03-15 16:19:00 -07:00
pointer.py mypy: Convert zerver/views to use typing.Text. 2016-12-26 13:43:09 -08:00
presence.py decorator: Add human_users_only decorator. 2017-04-16 12:51:23 -07:00
push_notifications.py Add support infrastructure for push notification bouncer service. 2017-04-18 23:03:06 -07:00
reactions.py reactions: Fix reacting to messages on streams you're not subscribed to. 2017-03-22 20:22:13 -07:00
realm.py Realm.py: Removing 'exclude' variable. 2017-04-19 22:08:36 -07:00
realm_domains.py realm_domains: Restructure library for getting realm domains. 2017-04-28 21:11:56 -07:00
realm_emoji.py realm-emoji: Add realm emoji uploading instead url providing. 2017-05-01 14:50:20 -07:00
realm_filters.py Change domain to realm_id in bugdown and realm filter dicts and caches. 2017-01-03 16:25:20 -08:00
realm_icon.py Add size limit for uploading user avatars and realm icons. 2017-03-07 22:13:01 -08:00
registration.py email: Fix zephyr mirror registration email not working with subdomains. 2017-05-03 20:52:24 -07:00
report.py statsd: Change keys to use Realm.string_id instead of domain. 2017-03-13 09:51:02 -07:00
streams.py Add internal_prep_private_message(). 2017-05-01 16:23:38 -07:00
tutorial.py internal_send_message: Make realm argument mandatory. 2017-01-21 21:37:30 -08:00
typing.py mypy: Added Dict, List and Set imports. 2017-03-04 14:33:44 -08:00
unsubscribe.py jinja2: No need for custom render_to_response. 2017-03-17 13:57:34 -07:00
upload.py uploads: Add authorization check before serving files. 2017-04-07 16:35:28 -07:00
user_settings.py user_settings: Update change-email confirmation message. 2017-05-03 19:34:58 -07:00
users.py Switch regenerate_api_key to use RealmAuditLog. 2017-04-25 10:23:33 -07:00
zephyr.py test-backend: Raise zerver/views/zephyr.py test coverage to 100%. 2017-02-26 20:54:25 -08:00