Commit Graph

7580 Commits

Author SHA1 Message Date
Luke Faraone dff03fafda Use LDAP-provided information if available for real names
If authoritative data is available from say the LDAP database, we now
ignore the POSTed user name, and don't offer it as a form field.

We fall back to giving the user a text field if they aren't in LDAP.

If users do not have any form fields to fill out, we simply bring them
to the app without the registration page, logging them in using a dummy
backend.

(imported from commit 6bee87430ba46ff753ea3408251e8a80c45c713f)
2013-11-22 16:51:26 -05:00
Luke Faraone af02e45a17 [manual] Support authentication and profile prefilling via LDAP
The latter doesn't depend on the former; we can still fill in your full
name even if you didn't authenticate via LDAP.

This commit requires django_auth_ldap to be installed. On Debian
systems, you can do so via APT:
    sudo apt-get install python-django-auth-ldap

On OS X, use your favourite package manager. For pip, I believe this
will work:
    pip install django_auth_ldap

django_auth_ldap depends on the "ldap" Python package, which should be
installed automatically on your system.

(imported from commit 43967754285990b06b5a920abe95b8bce44e2053)
2013-11-22 16:51:26 -05:00
Luke Faraone e711b8160a Tweak wording on password help to be method-agnostic.
(imported from commit 1037df705ce599f6f62345a6f6619b2e428912ff)
2013-11-22 16:51:26 -05:00
Tim Abbott 8919ebe6b2 puppet: Make sure prod0's future external IP has access to postgres.
(imported from commit 91523dc92fd15dc0cf19b7bca70513250c4da983)
2013-11-22 16:43:10 -05:00
Waseem Daher 5403a2d9b0 Experiment: Clicking desktop notification jumps you to the message in a narrow.
This seems to only work in Chrome and Safari.
Firefox (at least my version) simply doesn't fire an onclick
event, and our desktop app has its own native code that decides
what to do when a notification is clicked.

(imported from commit 30bacec4726b9e6c022dd2c74f83d37747260dba)
2013-11-22 16:33:41 -05:00
Zev Benjamin 18fc8c2059 puppet: Do peer authentication for user zulip on the DB servers
(imported from commit dceed53990db64b3c345726b02bf0c25815c2b25)
2013-11-22 15:58:09 -05:00
Steve Howell a74d503d51 Turn on single message narrowing for everybody.
(imported from commit b860ce0d48157462b432d9b915edca67a8e03556)
2013-11-22 15:33:23 -05:00
Steve Howell 688cc4963c Rename sort_narrow_list() to build_stream_list().
(imported from commit 533dbe4171b859077c496f656f8c2476107b318c)
2013-11-22 14:52:04 -05:00
Steve Howell 9a68022516 Extract build_subject_list().
(imported from commit 7ce2ec353c465e05e3e4dea3ce9be1651db2d86c)
2013-11-22 14:52:03 -05:00
Jessica McKellar d250373802 Add tests for long messages and topics.
(imported from commit f0455d9462bf3eae498258420069c48fcd1e2f43)
2013-11-22 13:53:03 -05:00
Jessica McKellar d0a49e3a80 Replace decentralized topic truncation with a single check when sending messages.
(imported from commit 291c999147dd59a9c7e1d9de446293755c17e99d)
2013-11-22 13:53:03 -05:00
Jessica McKellar baef4b9b00 Truncate long messages instead of rejecting them.
(imported from commit 41e0ce1e91ab7a441f2b21ad445344a86ae18fc7)
2013-11-22 13:53:03 -05:00
acrefoot 9f3ab73fa4 register, login-sso, or signup depending on deploy type
(imported from commit 28fac6b626b7d3dda6f3ce0bd4ed748e0a6a7761)
2013-11-22 13:50:24 -05:00
acrefoot 3a982c7c06 Modify /hello to go to register instead of signup on Enterprise
Also move the urls.py lines to the right place

(imported from commit f9d9805fe599ceffb6cdd1ed572d8656cb0d6d95)
2013-11-22 13:50:24 -05:00
acrefoot fd4565dd67 modify day1 emails to point to new /hello location
(imported from commit e22936378eb1a8c541c4af274e6e6491cca8d313)
2013-11-22 13:50:24 -05:00
acrefoot f943d3c351 Move /features, /hello from corporate to zerver
This makes these pages available on Enterprise installs too

(imported from commit 4eaca13dfa0de8a05829ac5d642cbdb1e581add9)
2013-11-22 13:50:24 -05:00
acrefoot 8c402109b9 Remove mobile apps from /apps in Enterprise
(imported from commit 70045c21e71454642ec6950934d3e736c5fa3410)
2013-11-22 13:50:24 -05:00
Tim Abbott 0d7e65ea77 Don't try to cleanup expired events queues.
(imported from commit 45329bd32442f4a706a853939b70b50469d408e4)
2013-11-22 12:36:30 -05:00
Jessica McKellar ebe3acf408 Generalize elide_subject in case the max topic length changes.
(imported from commit 6ffdd42d39580149a83869d6aff88bad8940fe02)
2013-11-22 11:28:19 -05:00
Jessica McKellar 5b01dadfd3 rss-bot: handle feeds that don't have a title.
(imported from commit 2d95ee0cd85ac25a7c0241ce1747509e2f9c6be6)
2013-11-22 11:28:19 -05:00
Tim Abbott c0e951f843 Add user_activity_test worker that does nothing.
This should help us debug the source of our memory leak problems.

(imported from commit 1bdc7ee2f72bdebb1cdc94601247834a434614d6)
2013-11-22 11:24:48 -05:00
Tim Abbott 9ba820703a Call reset_queries in our queue workers.
This fixes a small memory leak in our queue workers, where we don't
reset the accumulated times contained in our query logging data.

Longer-term, we may want to make something mergable for mainline where
we only store on the connection object the totals; that would be a
fixed amount of emmory per connection and thus not have this problem.

(imported from commit 914fa13acfb576f73c5f35e0f64c2f4d8a56b111)
2013-11-22 11:24:48 -05:00
Steve Howell 837b066f49 Turn on huddle list for everybody.
(imported from commit 812106231b192d8b0c0ab7b0e54e25677df56245)
2013-11-22 10:35:35 -05:00
Jessica McKellar ff800cdec3 Set unique client strings for our webhooks.
(imported from commit 48d8a2ec46399104d4f5de30722e65043572c69e)
2013-11-21 22:15:48 -05:00
Steve Howell 8f636bccf6 Triple-quote string in test_dangerous_block() for readability.
(imported from commit f8fdbff9cc992310907957ca0632bb646c726b9f)
2013-11-21 18:10:33 -05:00
Jessica McKellar f8435cde82 Truncate long Freshdesk subjects.
We're getting errors on prod for subjects that are too long.

(imported from commit 742d92745be543d4b33d0888c6653bbee3f86c25)
2013-11-21 17:45:02 -05:00
Jessica McKellar 10c5517414 In Safari, have shift-tab on edit message buttons do the right thing.
Safari doesn't let you (shift-)tab to buttons, so we have to support
this ourselves in several cases.

(imported from commit 1b8ae28d6950fd9686b442948d71ab300c7328dd)
2013-11-21 17:40:04 -05:00
Steve Howell ace12bcab6 Support arbitrarily nested fenced quote/code blocks.
Now we can nest fenced code/quote blocks inside of quote
blocks down to arbitrary depths.  Code blocks are always leafs.
Fenced blocks start with at least three tildes or backticks,
and the clump of punctuation then becomes the terminator for
the block.  If the user ends their message without terminators,
all blocks are automatically closed.

When inside a quote block, you can start another fenced block
with any header that doesn't match the end-string of the outer
block.  (If you don't want to specify a language, then you
can change the number of backticks/tildes to avoid amiguity.)

Most of the heavy lifting happens in FencedBlockPreprocessor.run().
The parser works by pushing handlers on to a stack and popping
them off when the ends of blocks are encountered. Parents communicate
with their children by passing in a simple Python list of strings
for the child to append to.  Handlers also maintain their own
lists for their own content, and when their done() method is called,
they render their data as needed.

The handlers are objects returned by functions, and the handler
functions close on variables push, pop, and processor.  The closure
style here makes the handlers pretty tightly coupled to the outer
run() method.  If we wanted to move to a class-based style, the
tradeoff would be that the class instances would have to marshall
push/pop/processor etc., but we could test the components more
easily in isolation.

Dealing with blank lines is very fiddly inside of bugdown.

The new functionality here is captured in the test
BugdownTest.test_complexly_nested_quote().

(imported from commit 53886c8de74bdf2bbd3cef8be9de25f05bddb93c)
2013-11-21 17:13:17 -05:00
Zev Benjamin 9b2aa657be Revert "restart-server: Use 'all' instead of specifying the supervisor jobs to operate on explicitly"
This reverts commit acef4c0027b77053497ef6e9f7aa4b61703205c3.

Despite the lower total downtime, this caused more user-facing downtime.

(imported from commit 5cce032bb20abe83853a65ee72bf0bb28af403cc)
2013-11-21 15:14:38 -05:00
Allen Rabinovich e10549a310 Lighten the message controls and show them on hover
(imported from commit 09953116ebef779ea99327ff7c76428e908e2e31)
2013-11-21 11:05:07 -08:00
Tim Abbott 654b384980 Disable use_socket for now.
(imported from commit e5b40075b3a418a17ad23e538400db0ccdeebf3f)
2013-11-21 13:50:54 -05:00
Jessica McKellar ae2202caad Update bankruptcy unread count to not include muted topics or read messages.
This should address user reports of huge bankruptcy counts even when
they are relatively caught up. The root issue is that we sometimes
don't mark messages as read for some reason.

(imported from commit 8799305a8665f9ee239575e6e95f603f89c1d427)
2013-11-21 13:01:01 -05:00
Tim Abbott 272e1c2d92 Revert "Don't send heartbeat events to clients that don't request them."
This reverts commit 1147814b22fb9737a807057ddbdbe0e9554086e0.

This seems to with some probability screw up our Zephyr mirroring
script.

(imported from commit 4f82452f1b0ca98e6b895db020e071d2daa325e4)
2013-11-21 12:53:26 -05:00
Tim Abbott c31dbba9cc [puppet] Update pg_hba.conf to include staging's public IP.
This is for the interval while staging is running in VPC and postgres
is not; we can clean up these changes once that's no longer the case.

This also updates test1's IP, which apparently someone forgot to
commit previously.

We're currently running this on prod.

(imported from commit 3feced750f643bb218d4240e9a3d5cd7116963ee)
2013-11-21 11:27:16 -05:00
Tim Abbott d385b35547 Improve copy for new webathena error.
(imported from commit 497f19220d1ab460b6bc0fa4f6bad2dd72733098)
2013-11-21 11:21:10 -05:00
Waseem Daher ce29c4dd34 Prefill the existing topic when editing a message topic.
This is a behavior that basically only administrators can trigger
today, with the exception of the fact that anyone can edit a no-topic
message.

(imported from commit d50eded79ddf3438d87e3dc6a8641fbfb034d50c)
2013-11-21 10:38:36 -05:00
Tim Abbott 8bfbaab1d5 Fix typo in puppet directories for zulip_internal.
(imported from commit 52627a9e71dfc28bedd6c955069da46d3ef56e83)
2013-11-21 10:06:40 -05:00
Leo Franchi c6b862d26d Add desktop sso puppet folder dependencies
(imported from commit 63d8cad722cf015a5925a28ab860431be31175be)
2013-11-20 19:12:53 -05:00
Tim Abbott bfd01454f8 Don't allow Zephyr users to send messages when not linked to webathena.
(imported from commit 03362a52e958aa1913ffb8bfa22ba57fa1697d7c)
2013-11-20 18:54:26 -05:00
Tim Abbott f0c6b63526 [puppet] Add cron job to restart our workers daily.
This is to ensure that if we have an interval where we're not doing
prod deploys, we don't have to worry about worker memory leaks killing
us.

(imported from commit 0b0180b0751f6c618d877b9c9ffc2b8287254e4d)
2013-11-20 18:34:16 -05:00
Tim Abbott 511856eba2 Cleanup event queues when browser windows reload.
(imported from commit ec06517ecc64af1724115bc94a0996a2822e2292)
2013-11-20 18:34:16 -05:00
Tim Abbott 630cfd72f1 Deregister event queues when done in our Nagios scripts.
(imported from commit a1f73403163323e1dd9eda2f5269e94c60abdd1a)
2013-11-20 18:34:16 -05:00
Tim Abbott ca8225cf47 [manual] Add endpoint to cleanup a finished events queue.
This requires a puppet apply on each of staging and prod0 to update
the nginx configuration to support the new URL when it is deployed.

(imported from commit a35a71a563fd1daca0d3ea4ec6874c5719a8564f)
2013-11-20 18:34:15 -05:00
acrefoot 5973f20b69 fix use of EXTERNAL_URL to EXTERNAL_HOST, and some typos
(imported from commit 3e6e0f337671b289202bc86c6224854b6ee623c5)
2013-11-20 17:39:07 -05:00
Zev Benjamin d2d695dcb6 Add an in-memory Client object cache
Client objects are immutable and there are very few of them, so caching them in
memory is cheap and saves a trip to memcached.

(imported from commit 300b9b402f4e509f86a7fd86b5f898dc3f43738f)
2013-11-20 16:55:10 -05:00
Steve Howell 792e0c5976 Add FencedBlockPreprocessorTest.
(imported from commit a7f73f04408288192b33f688bd5baadd362f9458)
2013-11-20 16:06:54 -05:00
Steve Howell 0d920dae87 Extract FencedBlockPreprocessor.placeholder().
(imported from commit cf6dab74ae97a57498e1e1807c7c4f272f3f448b)
2013-11-20 16:06:53 -05:00
Tim Abbott 6c7489ed88 logging: Log management commands that are run.
This could potentially help with debugging exactly what happened with
some issue down the line.

(imported from commit cc7321d742875b644d4727a084b462dcd01dcf10)
2013-11-20 14:31:08 -05:00
Steve Howell 2955cac47e Extract vars in FencedBlockPreprocessor.process_fence().
(imported from commit 092a8e5f7479f1d918219cae058b6a867743c7f9)
2013-11-20 14:30:56 -05:00
Steve Howell b3344c2f49 Move langclass var into FencedBlockPreprocessor.format_code().
(imported from commit e468a8b6a12494facb0dfa97eff90e02cd14f169)
2013-11-20 14:30:55 -05:00