Commit Graph

16505 Commits

Author SHA1 Message Date
Tim Abbott
267346f5fb AdminZulipHandler: Support passing a record without a request. 2017-03-26 13:10:43 -07:00
Tim Abbott
efa151b488 AdminZulipHandler: Extract add_request_metadata. 2017-03-26 13:10:43 -07:00
Tim Abbott
4276face7f AdminZulipHandler: Construct report more dynamically. 2017-03-26 13:10:43 -07:00
Tim Abbott
1a17b11788 logging_handlers: Add tests for main error reporting code path. 2017-03-26 13:10:43 -07:00
Tim Abbott
033fd98e5f decorator: Add rate limiting to zulip_login_required. 2017-03-26 13:10:43 -07:00
Tim Abbott
385551ff62 decorator: Add rate-limiting to JSON views. 2017-03-26 13:10:43 -07:00
Tim Abbott
6c4c8178f0 zulip_login_required: Set request._query.
This fixes an exception we had in the user_activity queue processor
when changing email addresses, since the URL containing the
confirmation key was longer than 50 characters.
2017-03-26 13:10:43 -07:00
Steve Howell
cf6545a71f reactions: Only warn for unknown user ids.
If we get reactions for deactivated users, or otherwise missing
users, we only issue a blueslip warning now.  The function
get_message_reactions() was indirectly causing blueslip errors
before this fix, but we can downgrade to warnings now that this
function has better unit tests around it.

We eventually want to track deactivated users on the client.

Fixes #4289
2017-03-26 11:51:36 -07:00
Steve Howell
3da047e10e Add people.is_known_user_id(). 2017-03-26 11:39:06 -07:00
Steve Howell
80addd902c Extract local vars in get_message_reactions(). 2017-03-26 11:39:05 -07:00
Steve Howell
03b7e59b59 node tests: Add reactions.js test module.
We test get_message_reactions() in our first test here.
2017-03-26 11:39:05 -07:00
Feorlen
10ccfcdc8e Set umask 022 before starting prod install.
Fixes #2372.
2017-03-25 23:59:44 -07:00
Tim Abbott
5672618b82 css: Extract popovers.css. 2017-03-25 20:14:17 -07:00
Bao Chau
9b6e648acb registration: Fetch length limits from the backend's actual sizes.
This makes these more likely to remain accurate over time.

Fixes #4211.
2017-03-25 20:10:12 -07:00
Rishi Gupta
30024d0a8f models: Remove Realm.domain. 2017-03-25 19:55:48 -07:00
Rishi Gupta
b416587aab Change sender_domain to sender_realm_str in message dict. 2017-03-25 19:50:24 -07:00
Rishi Gupta
88abb7871d Remove domain from list of pre-fetched fields for message recipients. 2017-03-25 19:50:24 -07:00
Tim Abbott
5bf01fb7d4 create-production-venv: Fix issues with api/ relative path.
Fixes #4313.
2017-03-25 19:49:26 -07:00
Tim Abbott
c7f1a7aa19 test_script: Use LooseVersion for version conparisons.
Fixes #4292.
2017-03-25 19:49:03 -07:00
Cynthia Lin
f41883ce8d subs.js: Refactor row data functions to return objects. 2017-03-25 18:35:21 -07:00
Cynthia Lin
6e2d180a34 hotkeys: Add hotkey n for opening New streams modal in Streams menu. 2017-03-25 18:35:21 -07:00
Cynthia Lin
ca460fad1f hotkeys: Add hotkey V for viewing selected stream in Streams menu. 2017-03-25 18:35:21 -07:00
Cynthia Lin
a027e9318d hotkeys: Move cursor to Filter streams input if at top of Streams menu.
Fixes #4227
2017-03-25 18:35:21 -07:00
Cynthia Lin
b800cb05c0 hotkeys: Add left/right arrow keys to toggle views in Streams menu.
Fixes #4228
2017-03-25 18:35:21 -07:00
Cynthia Lin
fb89d8a2bf subs.js: Refactor modal row functions. 2017-03-25 18:35:21 -07:00
Cynthia Lin
69c32daffa hotkeys: Add U hotkey for unsubscribing/subscribing in Streams menu.
Fixes #4229
2017-03-25 18:35:21 -07:00
Cynthia Lin
d17131dcb4 hotkeys: Rename subs.arrow_keys() to subs.switch_rows(). 2017-03-25 18:35:21 -07:00
Aditya Bansal
42265fe035 Fix '@' in userprofile popover to use font-awesome icon. 2017-03-25 18:30:58 -07:00
Aditya Bansal
91962aa6ab font-awesome: Fix font-awesome 4.7.0 upgrade in a hacky way.
What actually has been done below is to just copy the css class defination
from the latest font-awesome css to be here and since the rest of the stuff
in /third/fontawesome was updated in ee0b16b1ef
we should be able to use this safely until we update all font-awesome class
usage in templates.

Fixes #4302.
2017-03-25 18:30:40 -07:00
Harshit Bansal
11327fda7c actions.py: Only admins and bot's owner should recieve bot related events.
Modify `bot_owner_user_ids()` to return the user_ids of only
admins and bot owners instead of all the current active users.
This was causing a traceback on the frontend.

Fixes: #3391.
2017-03-25 18:22:15 -07:00
Elliott Jin
98ddb4453e test-backend: Raise zerver/views/home.py test coverage to 100%. 2017-03-25 18:16:16 -07:00
Elliott Jin
1c0d58f897 test-backend: Raise zerver/views/auth.py test coverage to 100%. 2017-03-25 18:16:16 -07:00
K.Kanakhin
fe3213798d retention: Add models to store expired messages.
This addresses part of #106.
2017-03-25 18:12:06 -07:00
Tim Abbott
18e66983c4 signals: Fix mypy error. 2017-03-25 18:06:04 -07:00
K.Kanakhin
234a1f8e61 retention-period: Add retention period to front-end admin organization settings.
- Add message retention period field to organization settings form.
- Add css for retention period field.
- Add convertor to not negative int or to None.
- Add retention period setting processing to back-end.
- Fix tests.

Modified by tabbott to hide the setting, since it doesn't work yet.
The goal of merging this setting code now is to avoid unnecessary
merge conflicts in the future.

Part of #106.
2017-03-25 17:57:18 -07:00
Tim Abbott
6a884acff5 signals: Avoid importing bugdown from early initialization.
This fixes `tools/build-release-tarballs` failing.
2017-03-25 17:27:46 -07:00
Tim Abbott
004133561b realm_filters: Support ? in URL format strings. 2017-03-25 17:13:34 -07:00
Tim Abbott
22d284950d trello: Clean up the documentation. 2017-03-25 17:04:52 -07:00
hollywoodno
75d9630258 Add notifications on new logins to Zulip.
This adds helpful email notifications for users who just logged into a
Zulip server, as a security protection against accounts being hacked.

Text tweaked by tabbott.

Fixes #2182.
2017-03-25 16:50:52 -07:00
Rishi Gupta
9f60dd8387 analytics: Send zeros for data.user.bot in Messages Sent Over Time.
It will simplify the logic needed to process the "Sent by Me" view in
Messages Sent Over Time in stats.js.

Also, we gzip the data sent from our server, so there is little additional
network usage by doing this.
2017-03-25 14:18:23 -07:00
Joshua Pan
16b2313165 muting_ui.js: Remove any popups when unmuting. 2017-03-25 12:49:14 -07:00
Joshua Pan
0ce38b6a92 Add documentation for M hotkey. 2017-03-25 09:42:49 -07:00
Joshua Pan
7adf70e5ad Add node tests for M hotkey. 2017-03-25 09:42:49 -07:00
Joshua Pan
76e84288d9 Add M hotkey to toggle mute/unmute topics.
Get rid of current_msg_list.selected_message() redundancy.
2017-03-25 09:42:49 -07:00
Joshua Pan
dc9f83005f Add toggle_mute to muting_ui.js. 2017-03-25 09:42:49 -07:00
Joshua Pan
32837804d8 Extract stream_popover.topic_ops to muting_ui.js. 2017-03-25 09:42:49 -07:00
Brock Whittaker
efd72d3338 Modify lightbox to only display valid images and YT Videos.
This modifies the lightbox to only display images inside the
".message_inline_image" class, rather than all images inside the
message body, which currently includes things like the bot icon.
2017-03-25 09:19:26 -07:00
Steve Howell
b3e4aa4c44 reactions: Downgrade blueslip error to a warning.
When we get a server error for adding/removing a reaction, we
no longer make a blueslip error, since it is somewhat common for
users to retry actions before the server sends an event.  The
code comment that is part of this commit explains this further.

Fixes #4290.
2017-03-24 18:24:15 -07:00
Sumana Harihareswara
d4b56df5e4 docs: Guide developer questions to GitHub and chat. 2017-03-24 12:07:14 -07:00
Umair Khan
f7860bca48 backends.py: Don't pass mutable default arguments.
Values of mutable default arguments are shared across all function
invocations. See
https://pythonconquerstheuniverse.wordpress.com/2012/02/15/mutable-default-arguments/
for further details.
2017-03-24 10:59:32 -07:00