Commit Graph

5006 Commits

Author SHA1 Message Date
Rishi Gupta
364415bba4 password reset flow: Use default noreply email address. 2017-07-04 14:25:01 -07:00
Tim Abbott
c2ee259987 settings: Simplify testing code for bool realm settings.
Now, when we add a new realm setting with the bool type, we don't need
to edit the tests at all.
2017-07-04 14:23:05 -07:00
Franziska von der Goltz
98847937f4 realm: add mandatory topic setting on org level.
Lets organizations require users to specify a topic the discussion.

Fixes: #5164.
2017-07-04 14:09:21 -07:00
Aditya Bansal
caa8a3f7fc Make test_google_oauth2_token_failure() work without internet. 2017-07-04 12:45:27 -07:00
Tim Abbott
59d2eae946 signals: Fix browser reporting for new Electron logins.
Previously, we were checking for "Zulip" entries in User-Agent strings
at the very end of the list, not the beginning.  A Zulip User-Agent
should have priority, since it includes the User-Agent strings for a
lot of other browsers, and also it will always be the most specific
value.
2017-07-03 10:12:20 -07:00
Harshit Bansal
7387e6fe4b bugdown/__init__.py: Close opened file objects. 2017-07-01 11:14:24 -07:00
Harshit Bansal
4cb8ac100a emoji: Fix the title and alt text for unicode emojis.
Unicode emojis when rendered should display canonical short name.
Similarly, the alt text should be of the format `:<short_name>:`.
For both of these we currently display the actual unicode symbol.
As some systems don't have the fonts necessary for displaying them
properly, they are rendered as empty square blocks. This commit also
ensures that the markup generated for emoji generated by canonical
name and by an unicode emoji is same.

Fixes: #5555.
2017-07-01 11:14:24 -07:00
Rishi Gupta
b55dce197d actions.py: Clear ScheduledJobs of users in do_deactivate_{user,realm}. 2017-07-01 08:44:47 -07:00
Pweaver (Paul Weaver)
2c10e7c0db Change from and noreply emails to use EXTERNAL_HOST domain.
This eliminates another mandatory setting from what one needs to
configure to setup a Zulip server.
2017-07-01 08:09:25 -07:00
Kenji Okimoto
2eb6c49a89 github_webhook: Fix a typo to handle issues event properly.
issue -> issues in the HTTP_X_GITHUB_EVENT.
2017-06-30 10:55:01 -07:00
Greg Price
7b526b3946 narrow: Add comments explaining how we limit to legitimately-visible results.
Two wrinkles here:

* It's actually a little subtle why `ok_to_include_history` is
  correct; in particular, it's not true that a term `stream:foo` will
  always limit the query to the stream `foo`.  For this, add an
  explanatory comment backed up by an assert.

* The TODO comment in `messages_in_narrow_backend` about assuming this
  is a search, I'm pretty sure doesn't matter; it seems to only be
  saying that we return the set of fields we would for a search.
  They're harmless to send, and in any case it doesn't appear to be
  true anymore that the client only calls this for a search: the
  `can_apply_locally` function also causes narrows with `has:` to go
  to the server.  So just take that comment out.
2017-06-30 11:47:40 -04:00
Greg Price
7785a1046b narrow: Describe the key security invariant of NarrowBuilder.
(After writing the term "invariant" a few times in these comments and
now this commit message, my inner mathematician reminds me that this
property is properly termed a "monovariant" -- something does change,
but it changes only in one direction.  Pretty sure saying "invariant"
communicates better here, though.)
2017-06-30 11:47:40 -04:00
Sadjad Fouladi
92fefa0e7e Fix a grammatical error in status change message. 2017-06-30 11:44:04 -04:00
Rishi Gupta
577e201df0 emails: Replace DEFAULT_FROM_EMAIL with ZULIP_ADMINISTRATOR.
We're getting rid of DEFAULT_FROM_EMAIL from prod_settings_template, since
we only really need one of {DEFAULT_FROM_EMAIL, ZULIP_ADMINISTRATOR}.
2017-06-29 17:54:33 -07:00
Rishi Gupta
36cd122905 models: Change default org_type to CORPORATE.
Once we implement org_type-specific features, it'll be easy to change a
corporate realm to a community realm, but hard to go the other way. The main
difference (the main thing that makes migrating from a community realm to a
corporate realm hard) is that you'd have to make everyone sign another terms
of service.
2017-06-29 15:14:58 -07:00
Harshit Bansal
fc6eedb831 bugdown: Make unicode_emoji_regex global. 2017-06-29 13:26:07 -07:00
Rishi Gupta
81220e050b context_processors: Remove zulip_admin from zulip_default_context.
There is no real distinction between zulip_admin and support_email in the
codebase, so fold them into a single variable.
2017-06-29 11:20:32 -07:00
Rishi Gupta
bf996f91ba deactivated.html: Use support_email instead of custom context variable. 2017-06-29 11:20:32 -07:00
Rishi Gupta
78790ce825 send_password_reset_email: Remove spurious send_mail import.
Make grepping for and otherwise understanding our email pathways slightly
easier.
2017-06-29 10:51:12 -07:00
vaibhav
7f9b4d3a94 Outgoing Webhook System: Add usage of Interfaces in DoRestCall. 2017-06-28 11:11:21 -04:00
vaibhav
a60552930e Outgoing Webhook System: Add base interface class and Generic class. 2017-06-28 11:11:21 -04:00
Yago González
2f4091b38d api: Fix caps in JSON validation error message. 2017-06-27 08:33:56 -04:00
Umair Khan
acf0aad4a2 signals.py: Bring coverage to 100%. 2017-06-26 16:14:14 -07:00
Umair Khan
6357737978 get_device_browser: Fix Opera detection.
Starting from version 15, Opera uses 'OPR/' in its user agent string.
We need to move Opera detection before Chrome detection because
Opera's user agent string satisfies Chrome conditions as well.
Ref: https://dev.opera.com/blog/opera-user-agent-strings-opera-15-and-beyond/
2017-06-26 16:14:14 -07:00
Umair Khan
14402b0b97 get_device_browser: Move Edge detection to the top.
The user agent strings of Edge satisfy Chrome condition as well.
Ref: https://msdn.microsoft.com/en-us/library/hh869301(v=vs.85).aspx
2017-06-26 16:14:14 -07:00
Umair Khan
dc78a7888f login_or_register_remote_user: Send login emails for mobile.
Fixes #5389
2017-06-26 16:14:14 -07:00
Umair Khan
34a91be9a2 api_fetch_api_key: Send new login emails for mobile. 2017-06-26 16:14:14 -07:00
Umair Khan
7e43cd5624 get_device_browser: Fix browser string for mobile.
Now get_device_browser() returns 'Zulip' for 'ZulipAndroid' and
'ZulipMobile'.
2017-06-26 16:14:14 -07:00
Umair Khan
b9c69004e4 google_oauth2_test: Pass headers in all requests.
Currently we only pass headers in the first client_get call but
sometimes the effective request which reaches the view is through
a later call to the client_get in this function. Due to which
headers are not passed.
2017-06-26 16:14:14 -07:00
Greg Price
058d76f5ff avatar_hash: Update a comment to reflect the current code.
Also move a couple of comments inside the functions they describe,
because they're about the implementation of the functions rather
than their interface.
2017-06-26 15:15:32 -07:00
Eeshan Garg
708f3a4bb1 lib/integrations: Stop rendering HTML files.
Now that all of our integrations/webhooks docs have been migrated
to Markdown, we no longer need to render HTML.
2017-06-26 12:30:04 -04:00
Eeshan Garg
4ad951f256 integrations/perforce: Migrate docs to Markdown. 2017-06-26 12:30:04 -04:00
Eeshan Garg
ed388ed320 integrations/redmine: Migrate docs to Markdown. 2017-06-26 12:30:04 -04:00
Eeshan Garg
53c1a53120 integrations/jenkins: Migrate docs to Markdown. 2017-06-26 12:30:04 -04:00
Eeshan Garg
9115be0e9e integrations/trello-plugin: Migrate docs to Markdown. 2017-06-26 12:30:04 -04:00
Eeshan Garg
c17600e3be integrations/rss: Migrate docs to Markdown. 2017-06-26 12:30:04 -04:00
Eeshan Garg
421c71919c integrations/mercurial: Use create-stream macro. 2017-06-26 12:30:04 -04:00
Eeshan Garg
9dde906115 integrations/git: Use macros and improve Markdown. 2017-06-26 12:30:04 -04:00
Eeshan Garg
b60c95d971 integrations/svn: Use Markdown macros. 2017-06-26 12:30:04 -04:00
Eeshan Garg
b9ac92c1a0 integrations/openshift: Use Markdown macros. 2017-06-26 12:30:04 -04:00
Eeshan Garg
31fa2f7c6d integrations/hubot: Migrate docs to Markdown. 2017-06-26 12:30:04 -04:00
Eeshan Garg
3eeb90c599 integrations/puppet: Migrate docs to Markdown. 2017-06-26 12:30:04 -04:00
Eeshan Garg
fc0d7ed882 integrations/phabricator: Migrate docs to Markdown. 2017-06-26 12:30:04 -04:00
Eeshan Garg
169d7393a6 jira-plugin: Use create-stream macro and improve Markdown. 2017-06-26 12:30:04 -04:00
Eeshan Garg
70448a9c65 integrations/email: Migrate docs to Markdown. 2017-06-26 12:30:04 -04:00
Eeshan Garg
5fa71a4369 integrations/asana: Migrate docs to Markdown. 2017-06-26 12:30:04 -04:00
Eeshan Garg
843dbbf3a1 webhooks/slack: Restructure docs to use create-stream.md macro. 2017-06-26 12:30:04 -04:00
Abhijeet Kaur
cf0040c402 bots: De-duplicate removing at-mention pattern for calling bots.
Similar code appeared at two places (the code is meant to remove the
leading @-mention before passing the remainder of the message to the
bot handler)—both 'zerver/worker/queue_processors.py' and
'api/bots_api/bot_lib.py'.

Remove function from the queue_processors.py file and let the entire message
be processed (includes removing of @-mention) at bot_lib.py.
2017-06-26 08:33:25 -04:00
Nick Sweeting
8e84c72acb Add error checking to payload['previous'] for Circle.CI.
This webhook used to fail if there was no previous payload.
2017-06-26 08:15:07 -04:00
Rishi Gupta
a56d703bdc i18n: Remove translation tags in management commands. 2017-06-25 11:28:28 -04:00