Commit Graph

31013 Commits

Author SHA1 Message Date
Rishi Gupta e527de3937 management: Remove set_default_streams.py.
We now support this directly in the realm admin UI.
2019-03-21 12:31:03 -07:00
Rishi Gupta e71a1a2b4e onboarding: Remove initial streams other than general and core team.
The hope is that by having a shorter list of initial streams, it'll
avoid some potential confusion confusion about the value of topics.
At the very least, having 5 streams each with 1 topic was not a good
way to introduce Zulip.

This commit minimizes changes to the message content in
`send_initial_realm_messages` to keep the diff readable. Future commits will
reshape the content.
2019-03-21 12:30:14 -07:00
Rishi Gupta d46b125bf2 onboarding: Change default notifications stream to #general. 2019-03-21 12:29:51 -07:00
Thomas Ip 7d050ab0cf typescript: Migrate dict.js to typescript. 2019-03-21 10:48:44 -07:00
Thomas Ip a290333325 typescript: Register ts-node to run TS modules in frontend tests. 2019-03-21 10:47:27 -07:00
Thomas Ip 676eafae7e typescript: Declare untyped JS modules. 2019-03-21 10:44:34 -07:00
Thomas Ip 42a666c22b dependencies: Downgrade ts-node to v7.0.1.
The current v8.0.0^ has a slow startup time due to some module
resolution issue.
2019-03-21 10:44:34 -07:00
Shubham Dhama 238885ca86 settings_users: Remove meta.current_deactivate_user_modal_row workaround.
The removes meta.current_deactivate_user_modal_row workaround by a more
readable and clear way.
2019-03-20 22:34:57 -07:00
Shubham Dhama 7ab0c26bda settings_users: Refactor some code for deactivate button. 2019-03-20 22:34:57 -07:00
Shubham Dhama 41140f2e46 settings_users: Use update_view_on_deactivate to update deactivate view.
This removes the function update_button_on_success as the action performed
by it can be done by update_view_on_deactivate.
2019-03-20 22:34:57 -07:00
Shubham Dhama f0c069a316 settings_users: Make update_view_on_reactivate function generic.
This also remove:
- meta.current_bot_element: As usage of meta has been wrongly exploited, we
  should refrain us from using meta this way i.e. to share variable between
  function using the global variable, as they reduce code readability.

- update_view_on_deactivate_reactivate_failure: Again to deduplicate the the
  code we're compromising with readability which isn't worth it here, also
  we need to this because we have removed above meta key.
2019-03-20 22:34:57 -07:00
Shubham Dhama 53abbd9408 settings_users: Remove redundant usage of `.user-admin-settings`.
No class with this name exist in codebase.
2019-03-20 22:34:57 -07:00
Shubham Dhama 42d19ababe settings_users: Fix update_view_on_deactivate to take row as an argument.
We should pass row as an argument to update_view_on_deactivate because we
update deactivate view of a row when the user get activated/deactivated by
the event system.

This also removes a redundant data variable.
2019-03-20 22:34:57 -07:00
Shubham Dhama 96aac91119 settings_users: Fix misleading comment.
This fixes a misleading comment as we want to change the view for both bots
    and users, whose active state is changed.
2019-03-20 22:34:57 -07:00
Shubham Dhama 060eacc980 settings_users: Move update_view_on_reactivate up.
This is done just to make code more readable.
2019-03-20 22:34:57 -07:00
Rishi Gupta c64b909556 analytics: Add autofocus to /support input box. 2019-03-20 22:28:03 -07:00
Raymond Akornor d8a2bb2b7c deliver_email: Refactor to extract email delivery.
This is a follow up on #11181. We extract email delivery into
`zerver/lib/send-email.py` to make it cleaner and easy to test.
2019-03-20 14:52:05 -07:00
Tim Abbott 8e92b36cf3 models: Add more documentation for PreregistrationUser. 2019-03-20 14:23:36 -07:00
Tim Abbott e7cc246d27 actions: Add docstring for do_update_message.
This should help with its readability.
2019-03-20 12:48:47 -07:00
neiljp (Neil Pilgrim) 7b3a9f34b7 mypy: Assert if we do_update_message then we have rendered_content. 2019-03-20 12:48:47 -07:00
neiljp (Neil Pilgrim) a80617bc70 mypy: Fix color_map default parameter for Optional. 2019-03-20 12:48:43 -07:00
neiljp (Neil Pilgrim) a40a0312f1 mypy: Correct default=None parameter typing in actions.py. 2019-03-20 12:41:34 -07:00
neiljp (Neil Pilgrim) 3d9c4494f5 mypy: Extract addressee.stream_name() check to satisfy mypy. 2019-03-20 12:41:34 -07:00
Vishnu Ks d921fd25e4 import: Move SubscriberHandler to import_util. 2019-03-20 11:29:51 -07:00
Vishnu Ks 6e3720e0b7 gitter: Fix minor comment typo in build_userprofile. 2019-03-20 10:12:18 -07:00
Tim Abbott 4f2c9f46bd actions: Improve format for delete events.
There were several problems with the old format:

* The sender was not necessarily the sender; it was the person who did
  the deletion (which could be an organization administrator)
* It didn't include the ID of the sender, just the email address.
* It didn't include the recipient ID, instead having a semi-malformed
  recipient_type_id under the weird name recipient_user_ids.

Since nothing was relying on the old behavior, we can just fix the
event structure.
2019-03-19 23:16:03 -07:00
Eeshan Garg a6abafa54b python-zulip-api: Upgrade to release 0.6.0. 2019-03-19 20:07:53 -02:30
Tim Abbott 0320355f09 echo: Add a minimum time for sending error spinner.
This at least makes clear that the button did something.
2019-03-19 13:30:46 -07:00
Tim Abbott a6c0ac44be css: Make message_failed icons always visible.
This fixes the confusing behavior that errors sending messages were
not immediately user-visible.

Based on work by Dominik Gryboś in #11479.

Fixes #10537.
2019-03-19 13:30:28 -07:00
Tim Abbott 9e85478010 css: Fix sizing and height of message_failed error icons.
Inspired by work by Dominik Gryboś in #11479.
2019-03-19 13:30:27 -07:00
Tim Abbott 4ae325ce6c css: Fix alignment of message_controls.
They were 1px too high.
2019-03-19 13:30:27 -07:00
Tim Abbott f9eeddc78c css: Limit message_failed class to inside message_controls.
This is mostly for readability.
2019-03-19 13:30:27 -07:00
Tim Abbott 8700d14c15 css: Remove unused message_local CSS class.
This is likely a very old legacy feature.
2019-03-19 13:30:27 -07:00
Tim Abbott 36b18cd183 css: Use SCSS nesting for message_controls region. 2019-03-19 13:30:27 -07:00
Tim Wissel ab6c39c94b bugfix: Hide tooltips when switching a narrow.
Fixes #4639.
2019-03-19 12:28:39 -07:00
Tim Abbott 38de5740fa integrations: Reduce excessive margin below sidebar headings.
This just didn't look good.
2019-03-19 11:08:51 -07:00
sameerchoubey 2efe1963a5 portico: Add /api links to /integrations.
This PR creates a custom section on the /integrations page and adds
links to /api for common requests.

Fixes #11803.
2019-03-19 11:08:38 -07:00
Zach Wener-Fligner ab15cd13a6 docs: Modify dev SSL/certbot setup docs to match script.
The docs specify passing hostname with the --hostname flag, which
doesn't match the actual usage in scripts/setup/setup-certbot. This
change fixes the docs to match the actual usage.
2019-03-19 10:45:53 -07:00
Tim Abbott b1da797955 puppet: Make uwsgi buffer size configurable. 2019-03-18 22:43:59 -07:00
Pragati Agrawal 9037ef56dc org_settings: Disable `Deactivate` button for yourself in Users tab.
This disables the Deactivate button for the current user in the Users tab,
so that it becomes hard to deactivae yourself accidently from Users tab.

Fixes #10427.
2019-03-18 22:41:09 -07:00
Anders Kaseorg 8b76a55b16 dependencies: Upgrade simplebar to 3.1.3.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-03-18 22:24:29 -07:00
Hemanth V. Alluri 261166f96d context_processors: Cache the realm description in default context. 2019-03-18 22:19:18 -07:00
Tim Abbott 6e8e7feffc settings: Fix webapp password change UI.
Apparently, this has been broken since
dee4e3fb89, due to the beforeSend code
here overriding the default beforeSend function that sets the CSRF
token.  The correct fix was actually to just run the relevant code
directly before the channel.patch call.

Fixes #11938.
2019-03-18 22:14:04 -07:00
vipul chhabra 958126733b message view: Fix The unexpected behavior of Youtube Thumbnail.
It is observed in Mozilla margin was considered from other side of thumbnail
due to some special padding issues observed in mozilla.

To fix this top and left value are assigned to 0 so that it automatically
takes its correct position in all browsers

Fixes #11867.
2019-03-18 13:19:59 -07:00
Thomas Ip da6fb98d21 typescript: Set appropriate compiler options.
* Make type-checking stricter.
* Use more modern features.
2019-03-18 12:49:47 -07:00
Tim Abbott 4f628fd945 docs: Discuss replacing memcached with redis more clearly.
This is a common question we get in architecture discussions.
2019-03-18 12:40:53 -07:00
Tim Abbott 58ca1ba5a4 models: Disable caching of supported_auth_backends for now.
This seems to be causing hard-to-debug test failures.
2019-03-18 11:29:05 -07:00
Mateusz Mandera 5f88406133 rate_limit tests: Cover RateLimiterLockingException case in rate_limit_user. 2019-03-18 11:16:58 -07:00
Mateusz Mandera 1a3297d122 email_mirror: Make send_to_email_mirror.py use mirror_email_message.
We change the send_to_email_mirror management command, to send messages
to the email mirror through the mirror_email_message function instead of
process_message - this makes the message follow a similar codepath as
emails sent into the mirror with the postfix configuration, which means
going through the MirrorWorker queue. The reason for this is to make
this command useful for testing the new email mirror rate limiter.
2019-03-18 11:16:58 -07:00
Mateusz Mandera 1901775383 email_mirror: Add realm-based rate limiting.
Closes #2420

We add rate limiting (max X emails withing Y seconds per realm) to the
email mirror. By creating RateLimitedRealmMirror class, inheriting from
RateLimitedObject, and rate_limit_mirror_by_realm function, following a
mechanism used by rate_limit_user, we're able to have this
implementation mostly rely on the already existing, and proven over
time, rate_limiter.py code. The rules are configurable in settings.py in
RATE_LIMITING_MIRROR_REALM_RULES, analogically to RATE_LIMITING_RULES.

Rate limit verification happens in the MirrorWorker in
queue_processors.py. We don't rate limit missed message emails, as due
to using one time addresses, they're not a spam threat.

test_mirror_worker is adapted to the altered MirrorWorker code and a new
test - test_mirror_worker_rate_limiting is added in test_queue_worker.py
to provide coverage for these changes.
2019-03-18 11:16:58 -07:00