Tim Abbott
e1498988d9
test_choose_realm: Hardcode REALMS_HAVE_SUBDOMAINS.
...
This is the only case that'll be important in the future, and this
is a nice checkpoint on the path to making REALMS_HAVE_SUBDMAINS=True.
2017-09-15 13:11:12 -07:00
Tim Abbott
064c8e39d6
backends: convert GitHub auth tests to consistently use zulip subdomain.
2017-09-15 13:09:02 -07:00
Tim Abbott
f1133ab53e
test_notifications: Fix HTML tests to assume REALMS_HAVE_SUBDOMAINS.
...
This is a step towards making REALMS_HAVE_SUBDOMAINS the default.
2017-09-15 12:28:38 -07:00
Steve Howell
84041d3195
Use itertools.groupby in bulk_get_subscriber_user_ids().
...
This results in about a 20% speedup by making more O(N)
things happen in C vs. Python.
2017-09-15 10:44:32 -07:00
Steve Howell
24b9f72b22
Use raw SQL in bulk_get_subscriber_user_ids().
...
This leads to more than a 2x speedup when tested with
20k+ total subscribers. (For large realms with lots of default
streams, this function deals with LOTS of data, so it is important
to optimize.)
2017-09-15 10:44:32 -07:00
Steve Howell
1553dc00e0
Introduce StreamRecipient class.
...
This class encapsulates the mapping of stream ids to
recipient ids, and it is optimized for bulk use and
repeated use (i.e. it remembers values it already fetched).
This particular commit barely improves the performance
of gather_subscriptions_helper, but it sets us up for
further optimizations.
Long term, we may try to denormalize stream_id on to the
Subscriber table or otherwise modify the database so we
don't have to jump through hoops to do this kind of mapping.
This commit will help enable those changes, because we
isolate the mapping to this one new class.
2017-09-15 10:44:32 -07:00
Steve Howell
fc2e485ca7
Sort emails in gather_subscriptions().
...
This helps makes the tests more deterministic.
2017-09-15 10:44:32 -07:00
Tim Abbott
15781dbc83
server_settings: Add email auth related features to data sent to clients.
...
This should make it possible for the mobile app to correctly allow
non-email addresses as usernames exactly when it makes sense to do so.
2017-09-15 10:30:20 -07:00
Supermanu
ac79bbfe08
login: Enable non-email username to login.
2017-09-15 10:30:19 -07:00
Supermanu
5f41f3c3cb
backends.py: Expose backends that require email usernames
2017-09-15 10:29:02 -07:00
Supermanu
28beddfd76
backends.py: Enable auth with any ldap attributes as username.
...
This commit enables user to authenticate with any attribute set in
AUTH_LDAP_USER_SEARCH given that LDAP_EMAIL_ATTR is set to an email
attributes in the ldap server. Thus email and username can be
completely unrelated.
With some tweaks by tabbott to squash in the documentation and make it
work on older servers.
2017-09-15 10:28:41 -07:00
Robert Hönig
fb39e884c8
docs: bots guide: Add section for writing tests.
2017-09-15 08:59:21 -07:00
Robert Hönig
e01dede172
docs: bots guide: Make API subsection of developer tutorial.
2017-09-15 08:55:35 -07:00
rht
107e6b4c51
requirements: Clean up dev.txt.
2017-09-15 07:58:40 -07:00
rht
2d06004ee9
requirements: Add documentation on regenerating lockfiles.
2017-09-15 07:58:19 -07:00
Tim Abbott
b334f3a9a4
locale: Update translations from transifex.
2017-09-15 06:46:38 -07:00
Brock Whittaker
d7651bdd25
Restyle default streams list to be grey-box and inline.
...
This moves the form to an inline style and restyles the box to be green.
2017-09-15 04:57:03 -07:00
Brock Whittaker
d7d5b382a7
Change realm filter settings box to be grey.
...
This changes the realm filter settings box to be the same grey as the
emoji add box instead of the green it was before.
2017-09-15 04:57:03 -07:00
Brock Whittaker
73ac9f4406
Restyle emoji box to look grey, inline form.
...
This makes it more compact as well as recoloring it to not be green.
2017-09-15 04:57:03 -07:00
Brock Whittaker
78adf01850
Normalize `.settings-section-title` headers.
...
This normalizes the headers to all look the same and in a larger font
size + weight.
2017-09-15 04:57:03 -07:00
Brock Whittaker
05ae3f643d
Make `.grey-box` an unscoped, generic class.
...
This now makes it accessible outside of the subscriptions overlay.
2017-09-15 04:57:03 -07:00
Rishi Gupta
b9c8747bd0
hotspots: Use tutorial_status to manage whether we show hotspots.
2017-09-15 04:14:52 -07:00
Rishi Gupta
06191c948d
hotspots.css: Change overlay color.
2017-09-15 04:14:52 -07:00
Rishi Gupta
ac48772732
hotspots.js: Fix timeout millisecond conversion.
2017-09-15 04:14:52 -07:00
Rishi Gupta
21f076ac5d
hotspots.py: Clean up SEND_ALL codepath.
...
Moves SEND_ALL to inside get_next_hotspots, since it is not something other
files should call.
Also changes the delay to 0s, and gates the code behind an
`if settings.DEVELOPMENT`.
2017-09-15 04:14:52 -07:00
Rishi Gupta
a8deedbbb6
hotspots: Replace stream_settings with intro_streams and intro_topics.
2017-09-15 04:14:52 -07:00
Rishi Gupta
0677bd2a6d
hotspots: Rename and update new_topic_button.
2017-09-15 04:14:52 -07:00
Rishi Gupta
4a383544af
hotspots: Rename and update click_to_reply.
2017-09-15 04:14:52 -07:00
Rishi Gupta
c985791773
hotspots.js: Inline map_hotspots_to_DOM.
...
The function is confusing and added unnecessary complexity, given that it is
only called in one place, and is not a function that should be exposed to
other modules.
2017-09-15 04:14:52 -07:00
Rishi Gupta
546384ce30
hotspots.js: Refactor place_icon for clarity.
2017-09-15 04:14:52 -07:00
Rishi Gupta
91819fa694
hotspots.js: Give names to long selectors in place_icon.
2017-09-15 04:14:52 -07:00
Rishi Gupta
9f7b310a3e
hotspots.js: Do not place_popover if icon is not visible.
...
Attempting to do so throws an exception if hotspot.location.element can't be
found.
2017-09-15 04:14:52 -07:00
Rishi Gupta
836a2c502e
hotspots.js: Clean up icon positioning code.
...
Also will allow more fine-grained positioning.
2017-09-15 04:14:52 -07:00
Vishnu Ks
fc59647a4a
Vagrantfile: Provide a way to remove proxy from vagrant.
...
Fixes #5292
2017-09-15 03:55:32 -07:00
Tommy Ip
641d4c167b
Remove line left of search bar
2017-09-15 03:39:40 -07:00
Tommy Ip
5168a0997d
Remove 1px space above search bar border.
2017-09-15 03:39:40 -07:00
Tommy Ip
3fb660d46e
Fix search bar box-shadow alignment.
2017-09-15 03:39:40 -07:00
Steve Howell
51d4f16fe0
Ignore inactive users in get_recipient_info().
...
We were mostly excluding inactive users before this fix, but
now we completely ignore them.
This potentially changes some of the data we return from
get_recipient_info(), but the extra user ids before this fix
were effectively ignored by the caller.
2017-09-15 03:08:52 -07:00
Steve Howell
1759137e4f
Don't queue feedback unless the bot is active.
...
The prior code would queue up feedback messages even if the
feedback bot was deactivated, which was just due to oversight
most likely. (People probably rarely disable the feedback bot,
but they should have that option.)
2017-09-15 03:08:52 -07:00
Tim Abbott
27bb680aa5
message_list: Fix exception with nonexistent streams.
...
If the stream no longer exists, we don't need to try to show a stream
resubscribe UI.
2017-09-15 01:59:24 -07:00
Tim Abbott
c330c75e3c
message_list: Refactor stream->stream_name local variable.
2017-09-15 01:59:24 -07:00
Robert Hönig
0941e27003
docs: Add docopt.org to shell understanding tips.
2017-09-15 01:40:59 -07:00
Vishnu Ks
2993ae5433
models: Include create_time in Attachment to_dict method.
2017-09-15 01:27:28 -07:00
Vishnu Ks
e34931971b
models: Include size in Attachment to_dict method.
2017-09-15 01:27:28 -07:00
Vishnu Ks
22bab1c7ec
events: Add upload_quota to initial state data.
2017-09-15 01:27:27 -07:00
Vishnu Ks
0ce62cd3e1
events: Add total_uploads_size to initial state data.
2017-09-15 01:27:20 -07:00
Tim Abbott
f1a0f23d23
bugdown: Document the mention fetches code block.
2017-09-15 01:21:04 -07:00
Steve Howell
7159f34bed
Avoid getting realm emoji unless there is emoji syntax.
2017-09-15 01:09:08 -07:00
Steve Howell
8a941d03ae
Avoid querying streams unless there are stream links.
2017-09-15 01:09:08 -07:00
Steve Howell
c3032a7fe8
Avoid looking up emails when rendering messages.
...
We now fetch email -> id mappings for messages ONLY if
it potentially uses the !avatar(foo@example.com ) syntax.
2017-09-15 01:09:08 -07:00