zulip/zerver/lib
Steve Howell 48d13257b6 Make `our_realm` explicit in `bulk_remove_subscriptions`.
There's an implicit assumption in bulk_remove_subscriptions
that all users belong to the same realm.  We use the realm
for things like comparing occupied streams before and
after our main operation of deactivating streams.

Before this change, we just used the user_profile variable
that leaked from some prior loop to look up the realm, which
was super brittle.

Now we're a bit more explicit.
2017-10-30 16:29:43 -07:00
..
bugdown refactor: Replace super(.*self) with Python 3-specific super(). 2017-10-30 14:30:25 -07:00
url_preview zerver/lib: Remove absolute_import. 2017-09-27 10:00:39 -07:00
webhooks lint: Fix lines in Python codebase longer than 120 characters. 2017-10-26 17:47:30 -07:00
__init__.py
actions.py Make `our_realm` explicit in `bulk_remove_subscriptions`. 2017-10-30 16:29:43 -07:00
addressee.py refactor: Move default_sending_stream logic to Addressee. 2017-09-28 12:14:08 -07:00
alert_words.py zerver/lib: remove `import six`. 2017-09-27 19:10:28 -07:00
attachments.py settings: Show error or success message when deleting uploaded files. 2017-09-27 17:50:22 -07:00
avatar.py refactor: Simplify avatar_url. 2017-10-12 14:00:41 -07:00
avatar_hash.py zerver/lib: Remove absolute_import. 2017-09-27 10:00:39 -07:00
bot_lib.py embedded bots: Move StateHandler query logic to separate file. 2017-10-30 13:37:56 -07:00
bot_storage.py embedded bots: Move StateHandler query logic to separate file. 2017-10-30 13:37:56 -07:00
bulk_create.py Add is_zephyr to the Stream model. 2017-10-11 16:15:56 -07:00
cache.py mypy: Properly annotate generic_bulk_cached_fetch. 2017-10-28 10:07:15 -07:00
cache_helpers.py Cache only one row per message. 2017-10-26 16:35:28 -07:00
camo.py pep8: Add compliance with rule E261 to camo.py. 2017-05-07 23:21:50 -07:00
ccache.py zerver/lib: remove `import six`. 2017-09-27 19:10:28 -07:00
context_managers.py zerver/lib: Remove absolute_import. 2017-09-27 10:00:39 -07:00
create_user.py py3: Remove "from six.moves import range". 2017-10-17 23:28:14 -07:00
db.py refactor: Replace super(.*self) with Python 3-specific super(). 2017-10-30 14:30:25 -07:00
debug.py zerver/lib: Remove absolute_import. 2017-09-27 10:00:39 -07:00
digest.py tests: Call real consume method of queue processors. 2017-10-26 14:58:03 -07:00
domains.py Add stricter domain validation and improve error messages. 2017-01-26 17:24:25 -08:00
email_mirror.py Extract get_personal_recipient(). 2017-10-28 17:57:39 -07:00
emoji.py reactions: Switch to using `name_to_codepoint`. 2017-10-04 23:09:14 -07:00
error_notify.py error_notify: Add IP address to browser error reports. 2017-10-04 13:46:05 -07:00
events.py lint: Fix lines in Python codebase longer than 120 characters. 2017-10-26 17:47:30 -07:00
exceptions.py refactor: Replace super(.*self) with Python 3-specific super(). 2017-10-30 14:30:25 -07:00
export.py lint: Wrap many very long lines in the Python codebase. 2017-10-26 17:31:58 -07:00
feedback.py zerver/lib: Remove absolute_import. 2017-09-27 10:00:39 -07:00
fix_unreads.py zerver/lib: Remove print_function. 2017-09-27 18:05:45 -07:00
generate_test_data.py py3: Remove "from six.moves import range". 2017-10-17 23:28:14 -07:00
hotspots.py hotspots: Use tutorial_status to manage whether we show hotspots. 2017-09-15 04:14:52 -07:00
html_diff.py html_diff: Migrate from `Text` to `str`. 2017-10-30 14:10:35 -07:00
i18n.py i18n: Use language code instead of locale. 2017-10-20 11:21:26 -07:00
initial_password.py zerver/lib: Remove absolute_import. 2017-09-27 10:00:39 -07:00
integrations.py refactor: Replace super(.*self) with Python 3-specific super(). 2017-10-30 14:30:25 -07:00
logging_util.py logging: Add option to show the PID in each log message. 2017-10-06 19:21:40 -07:00
management.py zerver/lib: Remove print_function. 2017-09-27 18:05:45 -07:00
mention.py zerver/lib: Remove absolute_import. 2017-09-27 10:00:39 -07:00
message.py refactor: Extract get_stream_subscriptions_for_user(). 2017-10-29 18:36:35 -07:00
migrate.py zerver/lib: Remove print_function. 2017-09-27 18:05:45 -07:00
mobile_auth_otp.py zerver/lib: Remove absolute_import. 2017-09-27 10:00:39 -07:00
name_restrictions.py name_restrictions: Update with new competitors and portico pages 2017-07-26 12:10:58 -04:00
narrow.py Update narrow.py, messages.py to support is:unread. 2017-06-19 06:51:13 -04:00
notifications.py Extract Message.is_stream_message(). 2017-10-28 17:57:39 -07:00
onboarding.py zerver/lib: Remove print_function. 2017-09-27 18:05:45 -07:00
outgoing_webhook.py Remove superfluous queue_json_publish imports. 2017-10-19 13:57:54 -07:00
parallel.py zerver/lib: Remove print_function. 2017-09-27 18:05:45 -07:00
profile.py mypy: Improve typing to profile.py & remove FuncT from decorator.py. 2017-10-29 17:10:13 -07:00
push_notifications.py Extract Message.is_stream_message(). 2017-10-28 17:57:39 -07:00
queue.py refactor: Replace super(.*self) with Python 3-specific super(). 2017-10-30 14:30:25 -07:00
rate_limiter.py zerver/lib: Remove absolute_import. 2017-09-27 10:00:39 -07:00
realm_icon.py zerver/lib: Remove absolute_import. 2017-09-27 10:00:39 -07:00
redis_utils.py zerver/lib: Remove absolute_import. 2017-09-27 10:00:39 -07:00
request.py zerver/lib: Remove absolute_import. 2017-09-27 10:00:39 -07:00
request.pyi JsonableError: Move into a normally-typed file. 2017-07-24 16:41:22 -07:00
response.py zerver/lib: Remove absolute_import. 2017-09-27 10:00:39 -07:00
rest.py zerver/lib: Remove absolute_import. 2017-09-27 10:00:39 -07:00
retention.py zerver/lib: Remove print_function. 2017-09-27 18:05:45 -07:00
send_email.py server settings: Add setting for MAILING_ADDRESS. 2017-10-19 00:04:07 -07:00
sessions.py zerver/lib: Remove absolute_import. 2017-09-27 10:00:39 -07:00
soft_deactivation.py zerver/lib: Remove absolute_import. 2017-09-27 10:00:39 -07:00
sqlalchemy_utils.py mypy: Remove a bunch of now-unnecessary type: ignore annotations. 2016-10-17 11:48:34 -07:00
statistics.py zerver/lib: Remove from __future__ import *. 2017-09-28 10:14:03 -07:00
str_utils.py zerver/lib: remove `import six`. 2017-09-27 19:10:28 -07:00
stream_recipient.py zerver/lib: Remove print_function. 2017-09-27 18:05:45 -07:00
stream_subscription.py refactor: Extract get_stream_subscriptions_for_users(). 2017-10-29 18:36:35 -07:00
stream_topic.py Extract StreamTopicTarget.get_active_subscriptions(). 2017-10-29 18:36:35 -07:00
streams.py Extract get_stream_recipient(). 2017-10-28 17:57:39 -07:00
subdomains.py subdomains: Tighten search for EXTERNAL_HOST in get_subdomain. 2017-10-27 14:42:24 -07:00
test_classes.py refactor: Extract get_stream_subscriptions_for_user(). 2017-10-29 18:36:35 -07:00
test_data.source.txt test_data.source.txt: Replace postmodernism generator text with a play. 2017-08-23 13:00:39 -07:00
test_fixtures.py test_fixtures: Move test_db_status state under UUID_VAR_PATH. 2017-10-17 21:15:58 -07:00
test_helpers.py Extract get_stream_recipient(). 2017-10-28 17:57:39 -07:00
test_runner.py refactor: Replace super(.*self) with Python 3-specific super(). 2017-10-30 14:30:25 -07:00
tex.py zerver/lib: Remove absolute_import. 2017-09-27 10:00:39 -07:00
timeout.py py3: Remove "from six.moves import range". 2017-10-17 23:28:14 -07:00
timestamp.py analytics: Enforce various datetime arguments are in UTC. 2017-10-05 11:22:06 -07:00
timezone.py zerver/lib: Remove absolute_import. 2017-09-27 10:00:39 -07:00
topic_mutes.py Extract get_stream_recipient(). 2017-10-28 17:57:39 -07:00
type_debug.py zerver/lib: Remove print_function. 2017-09-27 18:05:45 -07:00
unminify.py zerver/lib: Remove absolute_import. 2017-09-27 10:00:39 -07:00
upload.py zerver/lib: Remove absolute_import. 2017-09-27 10:00:39 -07:00
user_agent.py tests: Replace test_user_agent_parsing with a normal test. 2017-09-16 03:56:18 -07:00
users.py zerver/lib: Remove absolute_import. 2017-09-27 10:00:39 -07:00
utils.py refactor: Replace mkdir_p functions with Python 3 builtin. 2017-10-25 11:06:11 -07:00
validator.py zerver/lib: remove `import six`. 2017-09-27 19:10:28 -07:00