Aditya Bansal
0716702558
management: Log number of soft deactivated/reactivated users.
2017-08-15 22:05:19 -07:00
Aditya Bansal
5f5d99550e
soft-deactivation/management: Raise exception for non existant emails.
2017-08-15 22:05:19 -07:00
Aditya Bansal
cd11cbea14
soft-deactivation/management: Rename variable to make more sense.
...
We rename variable user_ids_to_deactivate to users_to_deactivate
since it was storing UserProfiles anyway.
2017-08-15 22:05:19 -07:00
Aditya Bansal
a33790946b
management: Add soft_deactivate_users command.
2017-08-15 08:33:16 -07:00
Vishnu Ks
f0bb11ef40
management: Use self.get_user in convert_bot_to_outgoing_webhook.
2017-08-08 14:13:19 -07:00
Vishnu Ks
d1bece2ec2
management: Use self.get_realm in create_stream.
2017-08-08 14:13:19 -07:00
Vishnu Ks
9fb5381acb
management: Use self.get_realm in set_default_streams.
2017-08-08 14:13:19 -07:00
Vishnu Ks
3bc475d04f
management: Use self.get_realm in rename_stream.
2017-08-08 14:13:19 -07:00
Vishnu Ks
4e7dbff197
management: Use self.get_realm in realm_filters.
2017-08-08 14:13:19 -07:00
Vishnu Ks
7859ec76cf
management: Use self.get_realm in realm_emoji.
2017-08-08 14:13:19 -07:00
Vishnu Ks
af1c1861da
management: Use self.get_realm in realm_domain.
2017-08-08 14:13:19 -07:00
Vishnu Ks
1b0b135bfc
management: Remove unused imports from process_queue.
2017-08-08 14:13:19 -07:00
Vishnu Ks
0532b35c43
management: Remove unused imports from print_email_delivery_backlog.
2017-08-08 14:13:19 -07:00
Vishnu Ks
164badde13
management: Use self.get_realm in merge_streams.
...
The variable encoding is removed becuase it is not used
anywhere.
2017-08-08 14:13:19 -07:00
Vishnu Ks
27936fcfd4
management: Remove unused imports from makemessages.
2017-08-08 14:13:19 -07:00
Vishnu Ks
cf61349563
management: Use self.get_realm in logout_all_users.
2017-08-08 14:13:19 -07:00
Vishnu Ks
e28a007487
management: Use self.get_user in knight command.
2017-08-08 14:13:19 -07:00
Vishnu Ks
3a2edc66f1
management: Use get_system_bot in initialize_voyager_db.
2017-08-08 14:13:19 -07:00
Vishnu Ks
f45b80aafe
management: Remove unused imports from initialize_voyager.
2017-08-08 14:13:19 -07:00
Vishnu Ks
05af206392
management: Remove unused imports from import command.
2017-08-08 14:13:19 -07:00
Vishnu Ks
f58efdc3cb
management: Remove unused imports from export_usermessage_batch.
2017-08-08 14:13:19 -07:00
Vishnu Ks
28e76c990a
management: Remove unused imports from email_mirror command.
2017-08-08 14:13:19 -07:00
Vishnu Ks
6687b236bf
management: Remove unused imports from deliver_email command.
2017-08-08 14:13:19 -07:00
Vishnu Ks
b8dacf9bf6
management: Remove unused import from checkconfig command.
2017-08-08 14:13:19 -07:00
Vishnu Ks
5ce0d85ccf
management: Remove unused import from check_redis command.
2017-08-08 14:13:19 -07:00
Vishnu Ks
19f8da4995
management: Use self.get_realm in export command.
2017-08-08 14:13:19 -07:00
Vishnu Ks
4e9dff09fd
management: Use self.get_realm in dump_messages.
2017-08-08 14:13:19 -07:00
Vishnu Ks
bc48c68c09
management: Use self.get_realm in reactivate_realm command.
2017-08-08 14:13:19 -07:00
Vishnu Ks
279af33ea2
management: Use self.get_realm in deactivate_realm.
2017-08-08 14:13:19 -07:00
Vishnu Ks
349d604ad5
management: Use self.get_realm in create_user.
2017-08-08 14:13:19 -07:00
Rishi Gupta
ddbf8b9c3c
management: Remove create_realm.py.
...
This no longer does the correct thing (in terms of onboarding emails,
default streams, etc), and is tempting for new server admins to use.
Once we remove it we'll also have the invariant that we can't have a realm
without a user, which will simplify accounts_register a bit.
2017-08-05 10:17:14 -07:00
Vishnu Ks
e7f5da83ac
management: Create list realms command.
...
Fixes #5917 .
2017-08-04 14:25:03 -07:00
Steve Howell
bc6543a236
Use do_mark_all_as_read() in bankrupt_users command.
2017-08-04 14:10:46 -07:00
Steve Howell
c5e4ce5278
Optimize show_unreads --fix approach.
...
This now breaks the process of cleaning up unread counts for
non-active streams into a three step process.
This allows us to use our unread message flags index, at least
in testing on dev. Here is the relevant excerpt from explain
analyze:
Bitmap Index Scan on zerver_usermessage_unread_message_id
2017-08-04 11:04:43 -07:00
Greg Price
cc30226af0
deliver_email: When disabled, sleep forever rather than exit.
...
This makes supervisor see the service as cheerfully running
and let it alone, rather than constantly retry starting it.
Because the crash/restart loop means repeatedly spending a
couple of seconds loading Django and the app, separated by
brief periods while supervisor notices the crash and acts
on it, it was actually consuming about 30-50% CPU on the
zulipchat.com staging server.
2017-08-03 16:28:19 -07:00
Steve Howell
e994ff36b5
Add option to fix unread messages for inactive streams.
2017-08-03 13:17:04 -07:00
Steve Howell
dad1c9326e
Add show_unreads management command.
...
This should help us troubleshoot anomalies with old unread
messages.
2017-08-03 13:17:04 -07:00
neiljp (Neil Pilgrim)
1c7d0c932a
mypy: Ensure type of trim_func is consistent in check_redis.py.
2017-08-03 11:03:14 -07:00
Umair Khan
9e33917d25
rate_limiter: Upgrade max_api_calls to generic API.
2017-08-02 18:01:39 -07:00
Umair Khan
ca9ac1948e
rate_limiter: Upgrade max_api_window to generic API.
2017-08-02 18:01:39 -07:00
Umair Khan
9c08b62448
rate_limiter: Upgrade unblock_user to generic API.
...
Change name to unblock_access as well.
2017-08-02 18:01:39 -07:00
Umair Khan
23be0875a1
rate_limiter: Upgrade block_user to generic API.
...
Change name to block_access as well.
2017-08-02 18:01:39 -07:00
rht
ca960da58f
create_user: Receive password input from a file instead of shell arg.
...
This is to be used for the case of container orchestration instead of
shell arg to prevent snooping by any user account on the server via `ps
-ef` or any superuser with read access to the user\'s bash history.
2017-07-27 18:08:52 -07:00
Umair Khan
758dbec9e2
tornado: Move setup_tornado_rabbitmq to application.py
2017-07-21 09:55:25 +05:00
Tim Abbott
240f37e8c4
management: Add script to merge two streams.
...
This is intended to be used occasionally when there's a really good
reason to do so. While it does work, it hasn't been extensively tested.
2017-07-18 21:08:24 -07:00
Rishi Gupta
0f4b71b766
confirmation: Liberate get_link_for_object from ConfirmationManager.
2017-07-17 23:18:47 -07:00
Rishi Gupta
aa845e7f60
models: Replace ScheduledJob with ScheduledEmail.
...
ScheduledJob was written for much more generality than it ended up being
used for. Currently it is used by send_future_email, and nothing
else. Tailoring the model to emails in particular will make it easier to do
things like selectively clear emails when people unsubscribe from particular
email types, or seamlessly handle using the same email on multiple realms.
2017-07-17 16:05:38 -07:00
Rishi Gupta
898269bbac
email: Change send_email to raise exception on failure.
...
More in line with how we do error handling in the rest of Zulip.
2017-07-16 16:56:39 -07:00
Rishi Gupta
3d24d12ba1
emails: Change reset password emails to use to_user_id.
2017-07-16 16:56:39 -07:00
Rishi Gupta
154d37afd2
emails: Add to_user_id argument to send_email.
...
Both the queue processor and ScheduledJob emails need to sometimes pass a
to_user_id and sometimes pass a to_email, and it's more convenient to just
have one function that they can call that can handle either.
Also removes the now redundant send_email_to_user.
2017-07-16 16:56:39 -07:00