Jessica McKellar
d72ed33dc6
Be more verbose and explicit in the checks on who can send a message.
...
It was getting hard to follow and is going to get more complicated
with a new super user check in a later commit.
(imported from commit 8d5cfa960824519d87ce0f09aab3a120ba9ef357)
2013-08-28 16:43:40 -04:00
Steve Howell
5b598a6d9c
Avoid churning the cache for stream name changes that don't change the cache key.
...
(imported from commit 1cc1ed01eaaaec4e6ddd6901fb5b877f831b604c)
2013-08-28 13:34:26 -04:00
Steve Howell
6aecdda7f7
Allow stream renames like corporate -> Corporate
...
(imported from commit 46d5078fb700631ef2a5b847eeeb055ff75d87d1)
2013-08-28 13:34:25 -04:00
Steve Howell
857680102f
Remove enforce_arity checks from Dict
...
(imported from commit 8fdb6d8807e5c16349c7fcf71f25ce73348a5fe1)
2013-08-28 12:29:11 -04:00
Jessica McKellar
b27f27f932
node tests: add some asserts for stream_data.delete_sub.
...
(imported from commit 3428f32206105b240e230e1050e7c16cd9c3729c)
2013-08-28 10:24:52 -04:00
Jessica McKellar
2be988e6b7
Give recipient_cache and associated functions a clearer name.
...
(imported from commit 14b12b196e33dfc4eeca5ab0f12c130ddaef1065)
2013-08-28 10:23:40 -04:00
Jessica McKellar
95c70967d2
rename-stream: support non-ASCII stream names.
...
(imported from commit 5fe2c803c0645bb6367f39bfe58acc478a66a0eb)
2013-08-28 10:23:39 -04:00
Jessica McKellar
8f3c5dc924
Add a management command to rename a stream.
...
(imported from commit b3acadc09b289b48e2ac298e50a5427545b6a473)
2013-08-28 10:23:39 -04:00
Jessica McKellar
97f0320dd1
Add the backend facilities for renaming a stream.
...
An important part of this is updating the various caches that cache
the display_recipient.
(imported from commit 888bf54fd205516cf31a25ba3f4e45ad11bbd4d5)
2013-08-28 10:23:39 -04:00
Jessica McKellar
c1439c8853
actions: factor stream name checks into a function.
...
(imported from commit e107e895f247f6bfafe2c21de12d8a3c5de9268a)
2013-08-28 10:23:39 -04:00
Jessica McKellar
1f4f799030
Flush the per-process recipient cache after every request.
...
This cache was created to make recipient lookups within a single
request (e.g. when fetching old messages) cheaper. To support stream
name changes, we need to invalidate this cache on every request so
that users get a consistent view of the name change.
(imported from commit 801051b9f6a108c1f50be7eca9a1242d661919b1)
2013-08-28 10:23:39 -04:00
Jessica McKellar
cd4daaa41f
Factor the display_recipient cache key into a function.
...
(imported from commit 4a80c4db6ddcf8104f45b6b068e598378e655bc0)
2013-08-28 10:23:37 -04:00
Jessica McKellar
d64c09b1ed
Add a cache_delete for deletion of items from memcached.
...
(imported from commit 4fbdc4c4b230a5ab029dacc2463437f81fb0d023)
2013-08-28 10:23:04 -04:00
Jessica McKellar
21d857e577
Add a cache_delete_many for bulk deletion of items from memcached.
...
(imported from commit 33fc65dce89e51b99f13b50216d975272a028c16)
2013-08-28 10:23:03 -04:00
Jessica McKellar
2dbe6914d9
Factor out finding active user IDs to a function.
...
(imported from commit c2d25b24833be900af40d45331e4b9eb9e3a2dc6)
2013-08-28 10:23:03 -04:00
Tim Abbott
648e85160d
Fix buggy application of subscription update events.
...
(imported from commit 4c76dc3ee5d3d1a298591c0c60dbe0e3aa30e0af)
2013-08-27 19:12:20 -04:00
Tim Abbott
77dbbe7f23
zephyr_mirror: Require zcrypt when mirroring to invite-only streams.
...
(imported from commit 1b88a8fc9bc26f2f9b1bb3f037093f85255feb17)
2013-08-27 18:26:12 -04:00
Tim Abbott
e95a81addb
Add Webathena login button to our mirroring page.
...
(imported from commit 43d8323bb502299027436a8c94c04f55d87bf953)
2013-08-27 15:41:43 -04:00
Steve Howell
667372068c
Add idempotency test coverage for muting.js
...
(imported from commit 50496866fa11df433150ff28f0f1e58e9e8b33bc)
2013-08-27 15:40:54 -04:00
Scott Feeney
9f054eb15f
Add a detailed docstring to rest_dispatch()
...
(imported from commit 6ff92e71e995e544c19828258a11d97e68294e3a)
2013-08-27 14:27:28 -04:00
Scott Feeney
f225c467b0
Strip whitespace from email/key during API auth
...
Trac #1681
(imported from commit 4c97bfea052d2da7673ba5a9520f7ddc7515d975)
2013-08-27 14:27:28 -04:00
Scott Feeney
141877a06c
Give a helpful error if API key is wrong length
...
Trac #1680
(imported from commit 0a50e7a93b37a5a3e74fb99c97a8917d8fbcc8f9)
2013-08-27 14:27:28 -04:00
Allen Rabinovich
2bb6f45af2
Add a data-name attribute to stream elements in the stream list and modify the test accordingly
...
(imported from commit 24791703015a47ae89fdf628d6511736b9d0f026)
2013-08-27 09:44:57 -07:00
Tim Abbott
134da30fdf
Add webathena authentication button for Zephyr users.
...
This shows up when you're not running a Zephyr mirroring bot and lets
you use Webathena to have us run it. Obviously needs more docs.
Current problems include:
* supervisorctl reload ends up recreating /var/run/supervisor.sock
with the wrong permissions, so it only works once in a row before
you need to chmod that.
* /etc/supervisor/conf.d needs to be humbug-writeable; this is a clear
local root vulnerability
* This uses SSH and thus is kinda slow.
(imported from commit 7029979615ffd50b10f126ce2cf9a85a5eefd7a2)
2013-08-26 18:17:25 -04:00
Zev Benjamin
44ecd09ac7
Simplify Github event capture condition and improve error handling
...
Attempted captures are causing errors and I'm not sure why.
(imported from commit ecf7a711fc13f2c8e036a0ebf6db6c2cd566109b)
2013-08-26 15:37:37 -04:00
Scott Feeney
0856274fd2
Change empty messages to '(deleted)'
...
Before this it was [deleted]. Using parens is consistent with how we put
in (no topic) if you don't specify a topic.
(imported from commit 931c06a1096cf7b0d226336cbe82535abd2e6032)
2013-08-26 14:13:42 -04:00
Steve Howell
a2bf6c3dd7
Test stream_data.in_home_view()
...
(imported from commit 29f1a187000e1818797c1a4781afaabca0ed29de)
2013-08-26 13:59:33 -04:00
Steve Howell
b486f06e71
Test stream_data.get_invite_only for unknown stream
...
(imported from commit fb4e51b44b8c20844a7575af1a471a626273ae39)
2013-08-26 13:59:33 -04:00
Steve Howell
5e2de02dfc
Test stream_data.get_color() for unknown stream
...
(imported from commit 7507e43de3f261a19d210c58863d1e614567f4bc)
2013-08-26 13:59:32 -04:00
Steve Howell
ca5cf073f4
Add test_get_and_set() to stream_data tests
...
(imported from commit 007486f08879ea8b98524a91ef3fc02565cc4d86)
2013-08-26 13:59:32 -04:00
Steve Howell
96a2f0d907
Test TypeError exception in Dict.from
...
(imported from commit 088bf04ecf10338e2d1cff1b86d5beb263ee19dc)
2013-08-26 11:21:30 -04:00
Steve Howell
5dda9a5816
Test is_subscribed=false path of unread.get_counts
...
(imported from commit 7fb6531fb6d2d475bf43de6267fd018cc7347d7a)
2013-08-26 11:21:30 -04:00
Steve Howell
1821005dfe
Restore subject counts for Uppercase streams
...
(imported from commit ef0e78d39c56da67544441a73ea257f215fefd94)
2013-08-26 11:21:29 -04:00
Steve Howell
ffa9cfd492
Test that unread.process_loaded_messages ignores read messages.
...
(imported from commit 262f20933551e786022de564f46c75f901d8123f)
2013-08-26 11:21:29 -04:00
Steve Howell
582eef8305
Add test_message_unread()
...
(imported from commit 7f26cafb90757a9c490a148b6dd7b4f4f0fb5f95)
2013-08-26 11:21:29 -04:00
Steve Howell
06065d50bf
Add dict.num_items()
...
(imported from commit 209a01b61d18d4b65b54e473cf727065aada68e8)
2013-08-26 11:21:29 -04:00
Kevin Mehall
7f1a1dba9d
Show realm emoji in typeahead and update the list via events.
...
(imported from commit bd8b8be5d088d503cac2b72cf228e769827e2308)
2013-08-23 21:39:29 -04:00
Kevin Mehall
e2a13637f2
Management command for realm emoji
...
(imported from commit 4de3ac69c34bc6e92d180c672fa8276338fecf53)
2013-08-23 21:39:29 -04:00
Kevin Mehall
d8146141a9
Render realm emoji.
...
(imported from commit 5a8dca8963bc6e2e16762844aebaefcb85a6aad2)
2013-08-23 21:39:29 -04:00
Kevin Mehall
32aa0bb72d
[migration] Add RealmEmoji model for realm-specific emoji.
...
(imported from commit d0a08b748f458c0ab68985b4cf00c78950ab40c4)
2013-08-23 21:39:29 -04:00
Steve Howell
63fa194139
Turn off the "muted" topic special case
...
(imported from commit ea34ea060eb29864c4816d0f14ee106dcb10be9d)
2013-08-23 18:33:48 -04:00
Steve Howell
4a7bab9a6f
Allow collapsing of recipient sections.
...
This is experimental, for staging only. There might be a better
way to model this than dueling force_expand/force_collapse flags,
but it works for now. The code in collapse_recipient_group()
could also be DRYed up relative to expand_summary_row().
(imported from commit 107151d1ecd640970fb7700d41278a003bd1abaa)
2013-08-23 15:57:31 -04:00
Zev Benjamin
2b1a99f985
Tweak Github test data to not cause the Github payload capture to error out
...
I believe the test data to be incorrect, but we'll find out when
we've captured some real data.
(imported from commit ae32af0436b6273d0b2a60b2c55047aace6adcad)
2013-08-23 15:44:19 -04:00
Steve Howell
b3ebb13469
Remove some ".d" suffixes in predicate tests.
...
I was saying bar.d in places where I wasn't really specifically
testing the .d feature, and it was distracting and just an
unintentional consequence of copy/paste.
(imported from commit 7b137b28cb33c72b83f02fe1d2961c5c6accc263)
2013-08-23 14:10:03 -04:00
Steve Howell
439e984f3d
Break up Filter predicate tests
...
(imported from commit 780559045d6ea84612617db9249d7f191dbd86d9)
2013-08-23 13:56:28 -04:00
Steve Howell
3239efd864
Simplify MIT regex code and harden tests
...
(imported from commit 96c988fb8c90d04dd4bcd7d2bbc04f1b1c8d8cb7)
2013-08-23 13:32:10 -04:00
Steve Howell
df812b40f9
Have test excercise Filter.predicate caching code.
...
(imported from commit 504abea7c1ef3a9cdb58b5bbcf2d751c5d98b1ea)
2013-08-23 13:32:10 -04:00
Steve Howell
f8c3b70ced
Clarify Filter tests dealing with bogus operators
...
(imported from commit db8327eb6df70bc8ffee7fb8166bc6491bd2fe70)
2013-08-23 13:32:09 -04:00
Steve Howell
ec5bfa2a10
Test Filter.public_operators()
...
(imported from commit 47e08ffb3eb7f91b95b84b91a249bcf99157998e)
2013-08-23 12:56:09 -04:00
Steve Howell
c205b8b29f
Test Filter.predicate better.
...
(imported from commit d32a1e0d7a638bc5bd010b902475a27527e699ba)
2013-08-23 12:56:08 -04:00