Rishi Gupta
43c2f35776
Add realm setting to disable message editing.
...
This is controlled through the admin tab and a new field in the Realms
table. This mirrors the behavior of the old hardcoded setting
feature_flags.disable_message_editing. Partially resolves #903 .
2016-07-10 11:57:24 -07:00
Rishi Gupta
07e7230ae1
models.py: Add post_save to Message.
...
Flushes message from cache after a message.save(). Needed for tests
where we directly manipulate Message objects in the database.
2016-07-10 11:42:18 -07:00
Eklavya Sharma
f1ba3ded42
Revert "Extract reply from email."
...
This reverts commit f1f48f305e
.
The use of sklearn unfortunately caused a substantial slowdown to the
Zulip provisioning process, which didn't seem worth it for a
relatively minor feature.
2016-07-10 11:30:30 -07:00
Eklavya Sharma
9161ddaee0
zerver/middleware.py: Handle binary data in errors.
...
In write_log_line, error_content can be binary_type and
error_content_iter can be a Sequence of binary_type. Handle
this this in a python 3 compatible way. Also change annotations
to reflect this fact.
2016-07-10 11:30:13 -07:00
Tim Abbott
88368397aa
lint-all: Add Python check for space after if.
2016-07-10 10:58:16 -07:00
Tim Abbott
dfc9e75342
nginx: Enable shared SSL session cache.
2016-07-10 08:30:10 -07:00
Alex Gaynor
ee47da8790
nginx: Disable RC4 and prefer server cipher order.
2016-07-10 08:30:05 -07:00
Steve Howell
c671881713
decorators: Extract is_local_addr().
2016-07-09 17:58:48 -07:00
Steve Howell
8e528569a7
Clean up rate_limit() for deployments that opt out.
...
If settings.RATE_LIMITING is False, short circuit rate
limiting earlier in rate_limit(). This change particularly
avoids inspect request.user and possibly spamming the error
log for sites that don't care about rate limiting.
2016-07-09 17:58:20 -07:00
Eklavya Sharma
801bcdd956
zerver/tests/tests.py: Fix non-deterministic failure.
...
Replace occurences of list(d.keys()) by sorted(d.keys()).
2016-07-09 17:54:54 -07:00
Eklavya Sharma
1f3ce7cf38
zerver/worker/queue_processors.py: Open file in binary.
...
Open a file in binary mode instead of text mode.
2016-07-09 17:54:54 -07:00
Eklavya Sharma
2f2e543a0e
zerver/tests/tests.py: Replace assertItemsEqual.
...
Replace assertItemsEqual(a, b) by assertEqual(sorted(a), sorted(b))
because assertItemsEqual has been removed in python 3.
2016-07-09 17:54:54 -07:00
Steve Howell
a8f11501eb
Add htmlcov directory to .gitignore.
2016-07-09 17:37:30 -07:00
Steve Howell
538bc61c54
Check more html files in check-templates.
...
Instead of just checking .html files in the templates directory,
we now also check them everywhere, including .html files used
for Casper tests and some static files.
2016-07-09 17:34:49 -07:00
Steve Howell
494ea4a4f4
Fix end tags in 404/5xx pages.
2016-07-09 17:34:49 -07:00
Steve Howell
520b255d95
Close HTML singleton tags in Casper files.
2016-07-09 17:34:49 -07:00
Tim Abbott
4d28111178
Move alert_words CSS to settings.css.
2016-07-09 08:01:54 -07:00
Tim Abbott
a43021005a
Remove unused notification-docs CSS.
2016-07-09 08:01:19 -07:00
aakash-cr7
63475a55f3
Add bots and avatars css to settings.css.
2016-07-09 08:01:12 -07:00
aakash-cr7
e37e384dd4
Add notification css to settings.css.
2016-07-09 07:53:51 -07:00
Steve Howell
89105e41d7
Added TestInternalNotifyView.
2016-07-09 07:47:12 -07:00
Steve Howell
ce14a3551d
Added test_get_client_name().
2016-07-09 07:37:13 -07:00
Steve Howell
69f18c26fc
Improve test_api_key_only_webhook_view().
...
This test now covers all lines of api_key_only_webhook_view(),
including the error logic and rate limiting logic.
2016-07-09 07:37:13 -07:00
Steve Howell
3d095beb63
Extracted client_is_exempt_from_rate_limiting().
2016-07-09 07:37:13 -07:00
Steve Howell
49543b9ec4
Added RateLimitTestCase tests.
2016-07-09 07:37:13 -07:00
Steve Howell
c680c6a981
Removed unused to_non_negative_float() function.
2016-07-09 07:37:13 -07:00
Umair Khan
b7ec66fc96
Remove templates, styles and js through storage.
2016-07-09 07:33:35 -07:00
Umair Khan
397da44744
Update documentaton to reflect Django-Pipeline==1.6.8.
2016-07-09 07:09:55 -07:00
Umair Khan
043ae8ad65
Upgrade to Django-Pipeline==1.6.8.
2016-07-09 07:09:55 -07:00
Umair Khan
2d243c0703
get_all_templates should not return __init__.py.
2016-07-09 07:09:55 -07:00
Tim Abbott
1e2d38e790
Move stringify_message_dict into to_dict_uncached.
2016-07-08 17:58:56 -07:00
Tim Abbott
72e948d19a
Remove now-unused message_cache_key message cache.
...
Originally this cache was used to transmit data from Django to Tornado
(and also for general message caching purposes), but now nothing
actually reads from this cache, so we can eliminate it.
2016-07-08 17:58:56 -07:00
Tim Abbott
8d5ec14b31
cache_helpers: Fill to_dict cache instead of old message cache.
...
Apparently, the message cache we were filling was completely useless
and unused, and furthermore, the cache we were filling as part of
restarting the server was also totally useless, since it didn't have
the messages users would be requesting.
2016-07-08 17:58:56 -07:00
Steve Howell
704c57a141
Fix end tag issues in api.html
...
(This fixes a minor style issue with the API keys/bots section,
but the change is mostly to make the HTML have balanced tags.)
2016-07-08 16:30:49 -07:00
Steve Howell
e35b84d438
Have lint-all pass along -m to check-templates.
2016-07-08 16:30:49 -07:00
Steve Howell
6154c73125
Support -m flag to check only modified templates.
2016-07-08 16:30:49 -07:00
Steve Howell
d1964a243e
Use lister module to find files for linting.
2016-07-08 16:30:49 -07:00
Steve Howell
1006b95898
Extract check_handlebar_templates.
2016-07-08 16:30:49 -07:00
Steve Howell
4e326ed138
Extract check_django_templates.
2016-07-08 16:30:49 -07:00
Steve Howell
3e9ceaeaf0
Move templates check to ok() function.
2016-07-08 16:30:49 -07:00
Tim Abbott
ea089518ee
Add Zulip customizations to Postgres 9.5 config file.
...
This includes reasonable tuning of memory usage parameters based on
the values that pgtune would use, roughly.
2016-07-08 16:16:12 -07:00
Tim Abbott
e818dff0b0
postgres: Remove comment matching Puppet ERB syntax.
2016-07-08 16:16:12 -07:00
Tim Abbott
6ba659aeec
Add a stock Ubuntu Xenial Postgres 9.5 configuration file.
2016-07-08 16:16:12 -07:00
Tim Abbott
0f5e62e994
puppet: Don't use pgtune on Linux versions where it doesn't exist.
2016-07-08 16:16:12 -07:00
Tim Abbott
903f728587
Scope postgresql.conf templates by postgres version.
2016-07-08 16:16:12 -07:00
Tim Abbott
ffe79e0d50
Fix EPMD restart being attempted on every puppet apply.
2016-07-08 16:16:11 -07:00
Tim Abbott
b13eeae24c
Remove finbot from Zulip repository.
...
It's been split into its own repository,
https://github.com/zulip/finbot .
2016-07-08 16:15:55 -07:00
Tim Abbott
12028339a3
puppet: Use --detailed-exitcodes to return nonzero exit code on failure.
...
Apparently, puppet has messed up exit codes and doesn't by default
return the usual 0=success, nonzero=failure codes. By default, it
seems to always return 0; and with `--detailed-exitcodes`, it returns
the complicated thing documented in the comments.
We fix this by checking the exit code and translating it to what we
actually care about, namely whether errors occurred.
See https://tickets.puppetlabs.com/browse/PUP-2754 for details.
Fixes #1094 .
2016-07-08 12:11:44 -07:00
Taranjeet
a8a4caf2c0
zerver: Fix lines with length greater than 120.
2016-07-08 11:41:43 -07:00
Tim Abbott
be93b6ea28
[third] Upgrade jquery to version 1.8.3.
...
Also use the modern NPM name of 'jquery' (all lower case), which is
required as part of this migration.
Fixes #1141 .
2016-07-08 11:09:54 -07:00