Commit Graph

2232 Commits

Author SHA1 Message Date
Keegan McAllister ca2b48e1ee Prevent scrolling in the stream/user sidebar from moving the message view
(imported from commit b2279b2bac07e29a41b3e5335d2e0d81eb196757)
2013-02-11 20:43:25 -05:00
Zev Benjamin 57b6d6eb50 Make integral easter-egg font-neutral
(imported from commit 2a6c751ab7e872e4b4ddd6bafcb86b0e5d091c1e)
2013-02-11 18:37:34 -05:00
Leo Franchi 674118c104 Add unit tests for active/idle presence
(imported from commit 2685b4ed052b32f347d9d879392b7e87c3e89e1a)
2013-02-11 18:05:57 -05:00
Leo Franchi 83011f7f47 Show a user activity list in the sidebar
(imported from commit 95aaa55c7e4cc39f844518b5308866bedf2cd1c5)
2013-02-11 18:05:57 -05:00
Leo Franchi c348dd3587 Remove get_instance() from SimpleQueueClient
SimpleQueueClient was not thread-safe as the pika method
calls that we are using might disconnect and end up in a bad
state if two threads enqueue messages at the same time.

In order to avoid this, each user of the rabbitmq queue
gets its own instance of a SimpleQueueClient.

(imported from commit 694083b75cd58a60b8de282a8f40eb92a864c5ce)
2013-02-11 18:05:57 -05:00
Leo Franchi 0a0c4bb9a0 [manual] Use rabbitmq for asynchronous presence updating
Note: When deploying, restarting the process-user-activity-commandline script is needed

(imported from commit 63ee795c9c7a7db4a40170cff5636dc1dd0b46a8)
2013-02-11 18:05:57 -05:00
Leo Franchi 31f87481d0 [manual][schema] Add an API for user presence (idle) information
Adds a new db table for storing presences, and an API for setting
an individual user's idleness as well as fetching all idle status
for all users in a realm

(imported from commit 5aad3510d4c90c49470c130d6dfa80f0d36b0057)
2013-02-11 18:05:57 -05:00
Leo Franchi 6f18f4465d Don't add a person more than once to our people_list
The full name may have changed

(imported from commit 44cf37b3f5e17c28f0a6b0a4c75a5c22470a9516)
2013-02-11 17:58:46 -05:00
Keegan McAllister b0bdd7fe0b actions: Flip the popover to the top of the message when near the bottom of the page
From the "reimplementing GUI toolkit behaviors from the early 90's" department.

(imported from commit f3aac2e44c77a858f657233dc032cd52c60843e9)
2013-02-11 17:17:04 -05:00
Keegan McAllister fb3a32f8f0 actions: Open the popover on more specific elements
Now if you click the timestamp, the popover appears near there, rather than in
the middle of the message.

(imported from commit 285a71fddd5b6d9ac86511e5fe41c811d2663342)
2013-02-11 16:59:07 -05:00
Keegan McAllister fe6a9b09ce Also underline timestamp and sender name when a click would open the popover
(imported from commit 4b234e2e1f0025862929906a80188b006c6048b4)
2013-02-11 13:59:19 -05:00
Keegan McAllister 04266fb39d Restore the timestamp tooltip
Now that this isn't the object controlling the actions popover, we can set its
title= back to anything we like.

(imported from commit 36d3ecb23fd22cdc9189537820b944442f7bb5c6)
2013-02-11 13:59:19 -05:00
Keegan McAllister f6cc8d3306 Make right-clicking anywhere on a message open the actions popover
(Except for links.)

(imported from commit 82ce229f3bbc647e9a35d93b063075fa68dbfe93)
2013-02-11 13:59:19 -05:00
Keegan McAllister 7fac4afbe7 Refactor show_actions_popover
(imported from commit 1cb7d7c6c032b0c38adc5b4a4e0752d554f07521)
2013-02-11 13:59:19 -05:00
Keegan McAllister acf61d9c48 actions: Add narrowing to the popover
This addresses another usability problem from #470.

I decided it was too confusing to have menu options for both stream and subject
narrowing, so I went with the latter.

(imported from commit 948fca954a265029ceb27c72ae178015d513785d)
2013-02-11 13:59:19 -05:00
Keegan McAllister 3609f5fdee Add helper narrow.from_popover
(imported from commit 6b20ce7e4eddff03351f5abe8f3f7c080876ea16)
2013-02-11 13:59:18 -05:00
Keegan McAllister 9356c0ca95 Add a link for the actions popover next to the timestamp
Hopefully the text and link-like styling will make it more clear that this
feature exists.

The sender's name is still clickable, but loses the link-like styling since the
popover isn't about the sender.  The space between the sender's name and this
link is now active as well.

We also remove the sender's email address that was previously visible on hover.
It's not hard for the name + email + actions link + timestamp to be too long
for one line.  The email is still present in the popover.

(imported from commit 3a85f199c42102cac0d217543db0a539935e2914)
2013-02-11 13:59:18 -05:00
Keegan McAllister a240ca2a67 Fix indentation in message template
(imported from commit e506bccefdfdc3c015f71f5caa144ce5de2a2bac)
2013-02-11 13:59:18 -05:00
Keegan McAllister 5052460b95 Generalize hover effect for stuff clickable to get the actions popover
Similar to the previous commit.

(imported from commit 4b9558ea204f637467f42995a69b0dbc1e0d8cac)
2013-02-11 13:59:18 -05:00
Keegan McAllister 03cf4199b5 Generalize the message hover effect
We now set a CSS class on the hovered message, which is used to
control email address visibility.

(imported from commit 787e24f71f20aa3a6452e57b94f5ca1a4c8bc32f)
2013-02-11 13:59:18 -05:00
Keegan McAllister 4476f3c083 actions: Clarify reply target
This addresses one of the usability problems from #470.

(imported from commit cb196ab02a82a18a3236ffc5c0c2c7bc87054810)
2013-02-11 13:59:18 -05:00
Keegan McAllister ab8037d828 actions: Move sender information out of the popover title into the body
This makes sense because the actions aren't really about the sender.

(imported from commit cf47939ecc93f4d1113268637e41c0a6daa0f2c2)
2013-02-11 13:59:18 -05:00
Keegan McAllister 16d62fe5de Combine the actions popover with the timeinfo popover
The message timestamp is now always clickable, and the popover contains the
full long-form date and time.  This addresses one problem from usability
testing (see #470).

(imported from commit ad502dff128ad1c934fc0d3faaf5e2931c91c37e)
2013-02-11 13:59:18 -05:00
Keegan McAllister 520d7b1f97 Rename userinfo_popover -> actions_popover
(imported from commit fab5a44af1acaf93640a2f57ffc25b3e97f55d2e)
2013-02-11 13:59:18 -05:00
Jessica McKellar 3a39ac76c4 Add a new /get_members API query.
(imported from commit ced7c74212210a1fcee03c1c402dca9b42483d11)
2013-02-11 13:45:46 -05:00
Zev Benjamin af2d8902c2 Only show the scrollbar for the sidebar on hover
(imported from commit 359443e2ebcbb9a4e440ee8edfe42cb7f2b2e73c)
2013-02-11 11:10:10 -05:00
Luke Faraone 8dbda2cd64 Use full emails rather than just usernames in /activity.
(imported from commit c0397d6429fe85f0bd6e57731dd2132ed1e11b85)
2013-02-11 10:33:16 -05:00
Jessica McKellar 0cbe53b9c7 Autocomplete @notifications to your bolded full name.
This is a stopgap to handle e-mail addresses like me@foo.com.

(imported from commit 804b477214d45f46373b2138d5ff9036644c87da)
2013-02-11 10:03:51 -05:00
Jessica McKellar 53f0b00785 Add a management command to change and log user emails.
(imported from commit 0bf25433a371f7e46ade96019f4a9ceebe395fe5)
2013-02-10 16:45:25 -05:00
Waseem Daher dc02e236df Document our Jenkins integration.
(imported from commit a2711e10eaf5ae4b06de5becf94f9857b535a63b)
2013-02-09 20:54:10 -05:00
Keegan McAllister aa644ab757 Remove direct use of x.attr('zid')
See https://wiki.humbughq.com/Code%20style#x.attrzid-vs.rows.idx
for why this is bad.

(imported from commit b341146704af3bb1b477b12d226096ab72b5e269)
2013-02-09 13:52:16 -05:00
Keegan McAllister 8399426b9c Remove incorrect 'title' argument when creating timeinfo popover
Bootstrap ignored this and instead used the title= attribute, containing the
full timestamp, which seems like what we want.

(imported from commit 8442835d61f89bd0bce75c05e17aabe85e0f417c)
2013-02-08 18:24:16 -05:00
Tim Abbott 000b02c068 Clean up code duplication in add_messages.
The interface is a little messy because so many of the inputs change
-- we need to better organize all these variables under centralized
'zfilt' and 'zhome' headings.

(imported from commit b247e86bf63ea2ea2c0d42ef23e8af0ce288d5dd)
2013-02-08 14:43:21 -05:00
Tim Abbott 2d9a21654b Fix messages being added to the home view out of order.
So here's the reproduction recipe:
(1) Find a narrow that doesn't have any messages since 4 days ago

(2) Directly visit that narrow in your browser (or wait for someone to
do a deploy and thus auto-reload)

(3) Wait until load_old_messages has been called at least once

(4) Un-narrow

(5) Scroll up, and notice that the 400 most recent messages are above
sets of older messages.

The cause is that the code in add_messages assumed that
selected_message_id was within the range of message already in the
home view.  This is true in most cases where add_message is being
called, but it is not true in the case that the user was in a narrowed
view containing only very old messages (And thus selected_message_id
would be older than everything in the home view).

We can fix this by tracking persistent_message_id separately and using
that for the relevant test in add_messages.

(imported from commit f0da2561ba68f729343b260adc398029fae6acf7)
2013-02-08 14:43:13 -05:00
Keegan McAllister 9edb616feb queue: Add logging
(imported from commit db2f15cf5f6a683f03d08a2e8b8ee4547537daf7)
2013-02-08 13:57:22 -05:00
Keegan McAllister 89c544f21f queue: Refactor SimpleQueueClient initialization
In anticipation of subclassing.

(imported from commit 1ebee932aed1b472bf9a8ab6d9bc30519f587c83)
2013-02-08 13:57:22 -05:00
Keegan McAllister d349de903b queue: Get rid of lazy initialization in SimpleQueue
Instead make it a singleton with a get_instance() class method.

(imported from commit e32cabf77b43361e74a11a23bba3a6d9fb32f82f)
2013-02-08 13:57:22 -05:00
Keegan McAllister b2bc7941dc queue: Use normal instance data in SimpleQueue
Code like this is dangerous:

    class SimpleQueue(object):
        queues = set()

because all instances will share the same 'queues' set object.

We don't really need multiple instances, but neither is there a reason to break
them.  So do the normal Python thing instead.

(imported from commit a56bb8414dd549cfd312c9565df198cf9d20f08a)
2013-02-08 13:57:22 -05:00
Keegan McAllister f14db52f22 queue: Rename SimpleQueue to SimpleQueueClient
It doesn't represent a single queue; that's what the 'queue_name' arguments are
for.

(imported from commit 8382ae6793ca7c3ae4b5aacf2c128113a7a88fb6)
2013-02-08 13:57:22 -05:00
Keegan McAllister 2617bbcdff queue: Remove shebang line
There's no reason to run this file as a script, and it's not marked as
executable.

(imported from commit 52bddaf2b59333c1f37b2cfc90b92a164c2e6d3c)
2013-02-08 13:57:22 -05:00
Keegan McAllister c5644cff12 notify_new_user: Remove code specific to customer29.invalid
(imported from commit 4ac29251ccbfafb4a7c2dd9d7b200474d68505d9)
2013-02-08 13:33:28 -05:00
Keegan McAllister d68674be83 Remove CUSTOMER30-specific account views
Reverts c4b6f744 (inexactly, since there are some other changes along the way).

(imported from commit 5c7294fb13cd0bc523ae55c137dc5254b7cb0121)
2013-02-08 13:33:28 -05:00
Jessica McKellar ad8e9598f6 Log domain in do_activate_user.
(imported from commit 0e39b5ddc395ff245f8e3b0252ea3b33a90860f1)
2013-02-08 13:20:19 -05:00
Jessica McKellar 18db4bc823 views: remove unused imports.
(imported from commit 38a4981637f1b3bfd9135d459a17a3ba142c86a7)
2013-02-08 13:20:19 -05:00
Jessica McKellar 50bab7af8f Log domain in user creation event.
(imported from commit d5aca898781b4f33a749536181e50f941bd16b59)
2013-02-08 13:20:19 -05:00
Jessica McKellar b99670777a tests: check actual e-mail results in invite tests.
(imported from commit 45debbc00024de66aecd6cef17946868819f9566)
2013-02-08 13:20:19 -05:00
Jessica McKellar 8d528f9441 tests: add tests for inviting existing users and users outside your domain.
(imported from commit c96e548fa934ba51e1549970c3700b6f26304fb4)
2013-02-08 13:20:19 -05:00
Jessica McKellar b35a529ef3 tests: update invite tests to reflect text changes.
(imported from commit a3d0d0068a0b51cdf7840891e6b5a17cc0c083d2)
2013-02-08 13:20:18 -05:00
Jessica McKellar 1fcf43c289 When someone invites you to Humbug, infer your domain from their referral.
Regardless of your e-mail address, as the realm might be open.

(imported from commit 5f9cdbdef52f8c8ae61035e71f12a9b7e4ed4a5e)
2013-02-08 13:20:18 -05:00
Jessica McKellar 8cac04565c retention: look up domain instead of inferring from a user's email.
(imported from commit d678c53e1806922fc23b8e5126493736b675b589)
2013-02-08 13:20:18 -05:00
Jessica McKellar 256fa0e485 Fix invite bug in which we'd falsely say you'd invited folks with existing accounts.
(imported from commit 9114836d084937dcc1a707338dd916e28f97a87d)
2013-02-08 13:20:18 -05:00
Jessica McKellar a332bee2b7 When inviting users, check if the invitee is in-domain or the realm is open.
(imported from commit 42e072d9717f38cc6d0c7010d37bbabd81aa3ae7)
2013-02-08 13:20:18 -05:00
Jessica McKellar aeba3beb55 Validate and document checking the domain of the recipient of an MIT Zephyr Humbug.
(imported from commit 35b8675171bcdf0c27655723bc76bced8b53a431)
2013-02-08 13:20:18 -05:00
Jessica McKellar 8d06143115 [manual][schema] Add a restricted_to_domain bit on realms.
Default True; if False, arbitrary e-mail addresses can use your realm.

(imported from commit 6eec7516a535429cbaa74f6348651feef73cacd6)
2013-02-08 13:16:35 -05:00
Luke Faraone fd1d790b72 Don't show the stream list on Humbug for MIT.
(imported from commit d9f952aaeb910a7c57ce1174141686331224c8c0)
2013-02-08 12:02:05 -05:00
Luke Faraone 686c709788 Add a link to filter to all private messages
(imported from commit 115f84b42c14acdc8d1827bd8d914a9ac6acab43)
2013-02-07 15:35:46 -05:00
Luke Faraone 9c86db20fc Add support for "labels" in the left sidebar.
(imported from commit 5e942a8d0c7f459148a4961736f4c5305e0c51b4)
2013-02-07 15:35:46 -05:00
Keegan McAllister 8f580352a8 retention_policy: Retain all metadata changes in logs
(imported from commit 28cfc452f1ceca8a3e6b04e32034911ba384a0a8)
2013-02-07 14:29:53 -05:00
Waseem Daher 5dfd4485b5 Properly sort member list on streams page.
(imported from commit 702e78810278584fc8b2e217523ee38ff7907471)
2013-02-07 14:17:58 -05:00
Waseem Daher 87b1c91406 Don't show success notifications on subscribe.
A visual change in the form will already have made it clear
that the action succeeded.

(imported from commit 114bc3a9c9ee759993b8e2c80f7d9a479d365e21)
2013-02-07 14:17:58 -05:00
Waseem Daher bd6be38010 Slightly cleaner subscriptions page error handling.
Prior to this commit, successfully creating a stream (or unsubscribing
from a stream) didn't clear earlier error messages.

Here's how you could reproduce it:
* Try to subscribe to ""
  (You get an error)
* Now unsubscribe from something, or subscribe
  to a new stream
  (The error message does not go away)

(imported from commit c3c6fa6081df00378182ff0c3499e9d907577c04)
2013-02-07 14:17:58 -05:00
Keegan McAllister 5be28bbbb4 expunge_logs: Abort on keyboard interrupt
(imported from commit b1fe93859c15e447c0935fcfb0e83a200bc016ba)
2013-02-07 11:34:49 -05:00
Keegan McAllister a8ffa339de retention_policy: On unrecognized events, print the timestamp to full precision
(imported from commit 0f5908e0602fa8be7dea3d9e3b1ecbc437531df9)
2013-02-07 11:34:49 -05:00
Keegan McAllister d80dd021f1 retention_policy: Retain realm_created events
Previously these fell through and printed a warning message.

(imported from commit b3e488ff845b636e17c8b5b51d6cd84c1451bd2b)
2013-02-07 11:34:49 -05:00
Waseem Daher e57d8883af invite: Only clear email addresses after successful invite.
Prior to this commit, we also cleared out all of your checkboxes,
which is frustrating if you wanted to invite another person to the
exact same set of streams.

(imported from commit 389f27ec35dc9bf8c9058c5ffa867929ac90f674)
2013-02-06 20:18:00 -05:00
Waseem Daher e98b4b9f1e invite: Draw lock by invite-only streams (and don't select by default).
(imported from commit 1ad8a033801f70d3c6491691eebef79bbce82b77)
2013-02-06 20:15:12 -05:00
Zev Benjamin 1618ee09fc Make integral easter-egg not move the word "Humbug"
(imported from commit 7fa8088343bf5cd049c17f511495d0220faa497d)
2013-02-06 18:07:51 -05:00
Waseem Daher 209a1bee3b integrations: Trac documentation.
(imported from commit 14978913711e3386ce3c845e434fc8e16ed0adf0)
2013-02-06 17:37:44 -05:00
Waseem Daher d8b9151a31 Initial documentation page for integrations.
(imported from commit cd73c63306ab7ed8c886c30488d5ab928fac6c06)
2013-02-06 16:53:13 -05:00
Waseem Daher c7447e19d9 Add a footer to all our portico content.
This makes /api look less abruptly cut off at the end.

(imported from commit 296e431dad2aa1f72b02bb59f5572c0bf33a7bc9)
2013-02-06 14:11:00 -05:00
Keegan McAllister 59bfe38448 Fix wait condition in subscriptions frontend test
Waiting for text "Waseemio" to appear isn't reliable, because the "create
stream" modal already contains that text.  Instead, do a more specific check
for a .subscription_name element.

(imported from commit 54689aeb9d243c3fb62d1765b2b4fb93d3bb40db)
2013-02-06 13:49:37 -05:00
Zev Benjamin 526995316f Use the new tsvector cache column for full text search
Note that the tsvector cache column should be fully populated before
commit is deployed.  Otherwise, full text search will be broken until
it's populated.

(imported from commit 23c36fb7d146c289148e8243c3d6a9a6494cfc62)
2013-02-06 12:09:49 -05:00
Zev Benjamin 88937655fd [manual] Add a ts_vector cache column on zephyr_message along with the appropriate trigger and index
This needs to be done in three South migrations to not block users
from sending messages for a long time.  Adding the column requires a
write lock on the zephyr_message table and populating the new column
takes a long time.  Thus, we can't do them both in the same
transaction (which South forces on migrations).  Additionally,
creating the index takes a lot of computation and needs to lock the
table when not done CONCURRENTLY, which can't be done inside of a
transaction.

To do this manual change, you need to run:
    python manage.py migrate zephyr 0007
    ssh postgres.humbughq.com 'echo "CREATE INDEX CONCURRENTLY zephyr_message_search_tsvector ON zephyr_message USING gin(search_tsvector);" | psql'
    python manage.py migrate zephyr 0008

on staging. No action is required on prod since the database is
shared.

Note that this migration must be done completely before we switch to
using the tsvector cache column.

(imported from commit b6a27013a60c1fd196eabb095d2d11d20bba5aac)
2013-02-06 12:09:49 -05:00
Leo Franchi c637b9cf44 Handle chars at end of link better
(imported from commit 53842bc17bbb9cfb555738ee6b72291d7ce61d67)
2013-02-06 11:51:52 -05:00
Waseem Daher bff57ad983 Only draw the subscriptions-page lock icon at render time.
Because a stream can never stop being invite-only, we don't
actually need any Javascript to manipulate this besides what's
in the Handlebars template.

(imported from commit 30dc3b0baf623d88d03a643f18cd411dbe3eacfb)
2013-02-05 17:24:29 -05:00
Waseem Daher 4da5c83f64 Optionally draw a lock icon by the stream name in the main view.
If it's an invite-only stream.

(imported from commit 02bb80fee6df2cd32ded0c6f2c2b918b8aa8ac05)
2013-02-05 17:24:29 -05:00
Waseem Daher f20bd27cf9 Expose our invite-only bit to subs.js's stream object.
(imported from commit bd4d6f62331262cef5c9763d7e0e9acfd4890396)
2013-02-05 17:24:29 -05:00
Waseem Daher 99edd920c5 tests: Make sure that our subscriptions list properly returns the invite-only bit.
(imported from commit c060c6b350d335d5e94c07314fcfe7c766f2efcd)
2013-02-05 17:24:29 -05:00
Waseem Daher af45236968 tests: Cause existing tests to pass after change to gather_subscriptions.
(imported from commit 3524a5d69d9228810ae863fdea9a9f007a1ca7db)
2013-02-05 17:24:29 -05:00
Waseem Daher 66850b5dcd Make gather_subscriptions pass along whether or not a stream is invite-only.
(imported from commit f71c171185a0552dba4917967d3feffb9c92c4fe)
2013-02-05 17:24:29 -05:00
Luke Faraone ff59e28f53 Catch all exceptions when sending a message from AdminHumbugHandler
If the database is down and the Handler crashes, we get an email with an
obnoxiously long subject line and without proper sanitization performed.

By wrapping internal_send_message in a try-except, we eliminate the most
common (read: to date, only) cause of crashes in our Handlers.

(imported from commit fd59e931ad0a4fff574d3cafa47348eacacb858f)
2013-02-05 16:12:48 -05:00
Luke Faraone e7762422e4 Filter out all cookies and the csrfmiddlewaretoken.
We also remove META here since it rarely contains anything useful, and
often contains sensitive environment vars.

(imported from commit 2909613f9f52684bef9175600961801104644c75)
2013-02-05 16:12:48 -05:00
Keegan McAllister c57368d71e Fix missing close brace in zephyr.css
This was introduced in d19991c7.  Fixes code highlighting when minified.

(imported from commit ea4360f8dcc51da464619b4d570884edb0de8e26)
2013-02-05 15:43:56 -05:00
Luke Faraone 914aa336c7 Don't send "in" operators to the server, as this is a client-side filter.
(imported from commit 1f3d3c09e24093e038d83985003af0b1c87d4ed8)
2013-02-05 15:34:37 -05:00
Luke Faraone 77d0a07e4f Don't add messages to zhome if the message's Stream has in_home_view=false.
We also introduce support narrowing to "home" and "all".

(imported from commit 53b8dea9c6045a0cde368b3163f6fd6ecde1c649)
2013-02-05 15:34:37 -05:00
Luke Faraone 3de93f2b2b Pass stream information in initial template.
This allows us to remove fetch_colors() entirely, and should speed up page
load a bit.

We also JSONEncoderForHTML instead of dumps so that the result is safe
to embed.

(imported from commit 013630911960e2ac1d0bae6f5df31ad342750594)
2013-02-05 15:34:37 -05:00
Luke Faraone ac0dbd0864 Return in_home_view in gather_subscriptions.
This enables us to do client-side filtering on messages by the value of
this setting.

(imported from commit e69a7772dc90c67cb91ea8f630f5b78c902e8fa8)
2013-02-05 15:34:37 -05:00
Luke Faraone e8afaa8b8e Return a dictionary in subscriptions/list instead of a tuple.
This will give us flexibility in the future to add new properties to the
list.

In order to support that, we now do a list comprehension rather than just
returning the gather_subscriptions list in get_stream_colors.

(imported from commit a3c0f749a3320f647440f800105942434da08111)
2013-02-05 15:34:37 -05:00
Luke Faraone 1c3c3cc33f Add call to toggle whether a view is in the home view.
(imported from commit 5ece7b74a5ac4929a46d3d66ae5d838e1f418b44)
2013-02-05 15:34:37 -05:00
Luke Faraone 2a01b355a4 Correctly return a JSON error if property value is not passed.
Previously we checked if property was false after doing .strip(). Since
you can't call string methods on a NoneType, we were 500ing.

The code now does a normal dictionary get via [] and catches the
KeyError.

(imported from commit da7f28febf0865f44e92bcac1791f817c3d370f3)
2013-02-05 15:34:37 -05:00
Luke Faraone b78d154370 Factor out subscription retrieval code into another function.
(imported from commit 6a66a4feb03990e11c98cd8666d1a7bb97299987)
2013-02-05 15:34:36 -05:00
Luke Faraone 3d25fbce49 Replace calls to json_error to raise JsonableError.
Returning json_error inside an inner function call will result in the error
getting lost.

(imported from commit fd7754b15f7b62fd6e4197fd72ae03d6996a93da)
2013-02-05 15:34:36 -05:00
Luke Faraone 2d4ef59f68 Fix InviteOnlyStreamTest to call public API
Previously we made calls to the JSON api, which means that the API key
was being ignored.

(imported from commit 46d8d0e5ac7926e824f300fd846ec42bc939e2c0)
2013-02-05 15:34:36 -05:00
Luke Faraone f0afa56cd3 [manual] South migration for Subscriptions model change.
Autogenerated schema migration:
 + Added field in_home_view on zephyr.Subscription

To do this manual change, you need to run:
    python manage.py migrate zephyr 0005

on staging. No action is required on prod since there is a shared database.

(imported from commit d554f17b25631482ec2d5605a42ac0b9d6df421e)
2013-02-05 15:34:35 -05:00
Luke Faraone cb5c9ed047 [schema] Add new boolean field in_home_view to Subscriptions
This is part of the Oppa Gmail Style proposed by Waseem.

(imported from commit 0663889bcb1f691842f69d243fd4ac0e4e3e0868)
2013-02-05 15:34:03 -05:00
Tim Abbott a3a0880266 middleware: Improve logging of users causing 40x errors.
Previously we only got the user ID for /json requests, not /api
requests, and also only got the user ID, not the email address.

(imported from commit c3625f9c1a48430e35183be6c90a7855f3714948)
2013-02-05 14:36:48 -05:00
Keegan McAllister 9349a2039c Fix comment syntax error in CSS
Introduced in d19991c7.  //-style comments aren't supported in CSS.

This was causing update-prod-static to fail with a stack overflow.

(imported from commit 4cb11a7025e8fef32c852d691fccf18a5ad3b955)
2013-02-05 14:05:10 -05:00
Leo Franchi 054420fc38 Match .co.uk before .co in linkification
(imported from commit 2461cb4d49eef15431dde30dda646b25dc860a7b)
2013-02-05 13:04:45 -05:00
Keegan McAllister a8ade10fde Restore streams-example.png for /new-user
This was removed in 63788aa3.  It was the only non-symlink in
zephyr/static-access-control/.

(imported from commit c9ee043b07c5fd4050aeaafa40394a6b69915bfb)
2013-02-05 12:07:41 -05:00
Jessica McKellar 5221885035 tests: add tests for get_subscribers.
(imported from commit 25ff513dcba72ad04487e6bfd9227457f8e3cc16)
2013-02-05 10:12:04 -05:00