Steve Howell
646abb57b7
refactor: Extract get_user_info_for_message_updates.
...
We'll want to expand this to get users that were mentioned in
the prior message, but this commit is just a refactoring.
2017-09-27 16:01:50 -07:00
rht
2949d1c1e8
zerver: Remove the rest of absolute_import.
2017-09-27 10:02:39 -07:00
rht
15ca13c8de
zerver/views: Remove absolute_import.
2017-09-27 10:00:39 -07:00
Tim Abbott
1c25bb5eba
auth: Fix typo in invalid subdomain logging.
2017-09-26 22:20:05 -07:00
Vishnu Ks
7fd4a71b7f
test_emails: Generate emails instead of hardcoding.
...
Tweaked by tabbott to use require_GET.
Fixes #6344 .
2017-09-26 15:02:47 -07:00
Alena Volkova
ca687e01d7
urls: Remove the old POST endpoint for alert words.
2017-09-26 14:00:51 -07:00
neiljp (Neil Pilgrim)
ef1242bb62
mypy: Split email validation error handling in json_change_settings.
2017-09-25 16:02:56 -07:00
Tim Abbott
0e1518bb67
auth: Disable coverage check for an auth error path.
...
This is just a temporary change to get tests passing again, though
it's possible we'll be deleting this code path before long.
2017-09-25 12:06:10 -07:00
Vishnu Ks
b4fedaa765
backend: Add support for multiuse user invite link.
2017-09-22 07:56:53 -07:00
Vishnu Ks
68ccfe78e6
registration: Add optional streams argument to send_registration_completion_email.
2017-09-22 07:51:58 -07:00
Tim Abbott
1edd137263
RealmAuditLog: Pass acting_user to do_reactivate_user.
2017-09-22 07:33:02 -07:00
Rishi Gupta
88bec16452
hotspots: Only narrow to PMs on first load.
...
After first load, the browser should set tutorial-status to started,
so this should automatically only happen once.
Fixes #6575 .
2017-09-22 05:01:53 -07:00
Steve Howell
f13cb94d84
Have exclude_topic_mutes() accept a stream id.
...
We want to convert stream names to stream ids as close
to the "edges" of our system as possible, so we let our
caller do the work of finding the stream id for a stream
narrow.
2017-09-20 10:31:33 -07:00
Steve Howell
26735eeeac
Only require realm_id for get_active_user_dicts_in_realm().
...
This is a preparatory commit that will eventually allow us
to avoid fetching realm info that we don't need, in other
parts of the codebase.
2017-09-20 10:31:33 -07:00
Tim Abbott
15781dbc83
server_settings: Add email auth related features to data sent to clients.
...
This should make it possible for the mobile app to correctly allow
non-email addresses as usernames exactly when it makes sense to do so.
2017-09-15 10:30:20 -07:00
Sarah
c3a8138f74
user_settings: Add push notifications for all stream messages.
...
Add setting to enable push notifications for all stream messages.
2017-09-14 05:41:37 -07:00
Steve Howell
ba397b5109
Use user_ids, not full objects, in render path.
...
There is no reason for either render_incoming_message() or
render_markdown() to require full UserProfile objects just to
triage alert words.
By only asking for user_ids, we save extra queries in two
callpaths and we make it easier to start using user_ids in
do_send_messages().
2017-09-12 04:22:55 -07:00
Steve Howell
4ac6bc46c7
Add MutedTopic model.
...
This commit completely switches us over to using a
dedicated model called MutedTopic to track which topics
a user has muted.
This includes the necessary migrations to create the
table and populate it from legacy data in UserProfile.
A subsequent commit will actually remove the old field
in UserProfile.
2017-09-02 09:19:51 -07:00
Steve Howell
0501570cd1
Remove POST-based API for setting topic mutes.
2017-08-29 16:53:38 -04:00
Steve Howell
8c4a5a9f7a
Extract exclude_topic_mutes.
...
This is mostly a pure code move, but I cleaned up the code
slightly to use early-return.
2017-08-29 16:53:38 -04:00
Tim Abbott
f1ad819547
home: Remove compatibility code for old name Humbug.
...
Since Zulip stopped being called Humbug in like 2013, this code hasn't
been useful in years, and is a bit confusing.
2017-08-28 16:15:58 -07:00
Tim Abbott
ac0d90e533
portico: Rename 'find_my_team' to 'find_account'.
2017-08-28 14:29:29 -07:00
Tim Abbott
a0a1fe1512
settings: Rename SERVER_URI to ROOT_DOMAIN_URI.
...
This should be a lot less confusing.
See #6013 for discussion.
2017-08-28 14:09:28 -07:00
Umair Khan
ecfafc05c0
registration: Use already_registered to show error.
...
Use this new variable to determine if the user already exists while
doing registration. While doing login through GitHub if we press
*Go back to login*, we pass email using email variable. As a result,
the login page starts showing the "User already exists error" if we
don't change the variable.
2017-08-28 07:02:11 -07:00
Steve Howell
313f73258d
Allow admins to delete private streams (backend only).
...
This is the backend piece. Getting the UI right here is a bit
more complicated here, but this allows admins to use the API
to delete streams.
2017-08-27 19:08:04 -07:00
Umair Khan
9720d3a986
accounts_register: Use redirect_to_deactivation_notice.
2017-08-25 00:09:06 -07:00
Umair Khan
b473ff54ce
Show realm deactivation notice for login/register.
...
Fixes #6247
2017-08-25 00:09:06 -07:00
Tim Abbott
e2ae096035
test_signup: Fix coverage of remaining find_my_team code.
2017-08-24 23:30:46 -07:00
Tim Abbott
59aae22f99
registration: Fix find_my_team handling of unusual users.
2017-08-24 23:17:08 -07:00
Tim Abbott
ffafa05bd5
decorator: Remove unnecesary import.
2017-08-24 23:16:31 -07:00
Tim Abbott
b3dbba3ad4
actions: Extract validate_email_for_realm helper.
2017-08-24 23:16:31 -07:00
Tim Abbott
60105fe38a
registration: Remove accounts_home_with_realm_str.
...
This was the old mechanism for logging into a specific realm on a
server with more than one not using REALMS_HAVE_SUBDOMAINS.
2017-08-24 20:44:52 -07:00
Tim Abbott
3d4893d906
settings: Rename SUBDOMAINS_HOMEPAGE to ROOT_DOMAIN_LANDING_PAGE.
...
This new setting name is a lot more readable.
2017-08-24 19:32:16 -07:00
Tim Abbott
ab61fe5922
auth: Fix Google auth to not assume SUBDOMAINS_HOMEPAGE.
...
Previously, Google auth would redirect you back to the login page on
this code path.
2017-08-24 19:03:42 -07:00
Tim Abbott
8b0c0c33b5
login: Fix logging for login/register actions.
...
Previously, Zulip's server logs would not show which user or client
was involved in login or user registration actions, which made
debugging more annoying than it needed to be.
2017-08-24 16:29:27 -07:00
Tim Abbott
a570a57fd5
login: Log which user was authenticated in mobile flows.
2017-08-24 16:29:27 -07:00
Steve Howell
87c4961597
Add zerver/lib/topic_mutes.py
...
This is mostly pure code extraction.
It also removes some dead code in update_muted_topic, where
were updating muted_topics spuriously before calling
do_update_muted_topic.
2017-08-24 14:20:35 -07:00
Tim Abbott
f46f3871b4
integrations: Add support for using root subdomain.
...
This fixes up the URL/link construction to make the root subdomain work.
2017-08-23 23:18:36 -07:00
Tim Abbott
d3e3c704d4
do_create_realm: Remove unnecessary second return value.
...
Unlike creating a stream, there's really no reason one would want to
call the function to create a realm while uncertain whether that realm
already existed.
2017-08-23 20:07:17 -07:00
Tim Abbott
8a65fdce49
subdomains: Fix over-aggressive redirect to find_my_team.
...
If the root domain is a valid subdomain, we don't want to redirect
everyone away from it.
2017-08-23 20:07:17 -07:00
Vishnu Ks
8418f0d30e
dev_login: List realms and show only users in the selected realm.
2017-08-23 19:27:32 -07:00
Vishnu Ks
50fe1f7d9c
streams: Fix errors when notifications_stream is deactivated.
...
Fixes #6225 .
2017-08-23 17:54:05 -07:00
Steve Howell
2b4faaa847
Support non-search queries in /json/messages/matches_narrow.
...
For filters like has:link, where the web app doesn't necessarily
want to guess whether incoming messages meet the criteria of the
filter, the server is asked to query rows that match the query.
Usually these queries are search queries, which have fields for
content_matches and subject_matches. Our logic was handling those
correctly.
Non-search queries were throwing an exception related to tuple
unpacking. Now we recognize when those fields are absent and
do the proper thing.
There are probably situations where the web app should stop hitting
this endpoint and just use its own filters. We are making the most
defensive fix first.
Fixes #6118
2017-08-23 01:07:57 -07:00
Tim Abbott
06f8fd529d
realm: Add clear error message for too-long realm name.
...
This fixes an exception we saw in production, as well as fixing the
form to not offer ultra-long names that we don't allow.
2017-08-22 22:04:52 -07:00
Tim Abbott
7c37fc8909
auth: Improve robustness of not sending duplicate login emails.
...
Previously, we had a very not-robust check on the URL, which might
have caused cases like Google auth registration to not do the right
thing.
2017-08-22 16:26:30 -07:00
Rishi Gupta
d296f29fa7
emails: Link to organization getting started guide in followup_day1.
2017-08-22 14:26:17 -07:00
Rishi Gupta
7c3f20d2ba
registration: Set is_realm_admin on user creation.
...
This makes it easier for later parts of the user creation/onboarding process
to condition on whether the user is a realm admin.
No change in behavior.
2017-08-22 14:26:17 -07:00
Steve Howell
54edecd510
Replace adddressee.for_email() with for_user_profile().
...
This requires us to change not just the immediate caller, but
also some of their callers, to pass user_profile objects around
instead of emails.
2017-08-22 10:42:15 -07:00
Steve Howell
e12da79732
create_realm: Redirect to a nice error page for SMTP errors.
...
Fixes #3850
2017-08-21 15:39:26 -07:00
Steve Howell
99e08fe49a
accounts_home: Redirect to nice error page for SMTP errors.
2017-08-21 15:39:26 -07:00