Tomasz Kolek
3e3a224607
Moved pagerduty webhook into its own file pagerduty.py
2016-03-14 20:44:50 -07:00
Tomasz Kolek
05dce01cee
Moved travis webhook into its own file travis.py
2016-03-14 20:44:45 -07:00
Tomasz Kolek
f640470fa4
Moved zendesk webhook into its own file zendesk.py
2016-03-14 20:44:42 -07:00
Tomasz Kolek
b3e5a256f5
Moved freshdesk webhook into its own file freshdesk.py
2016-03-14 20:44:41 -07:00
Tomasz Kolek
021c66fd9a
Moved stash webhook into its own file stash.py
2016-03-14 20:44:41 -07:00
Tomasz Kolek
7a4c9d243f
Moved deskdotcom webhook into its own file deskdotcom.py
2016-03-14 20:44:41 -07:00
Tomasz Kolek
087bd72814
Moved bitbucket webhook into its own file bitbucket.py
2016-03-14 20:44:41 -07:00
Tomasz Kolek
93b52f6f8e
Moved newrelic webhook into its own file newrelic.py
2016-03-14 20:44:41 -07:00
Tomasz Kolek
a2b31da045
Moved pivotal webhook into its own file pivotal.py
2016-03-14 20:44:41 -07:00
Tomasz Kolek
5ade895936
Moved jira webhook into its own file jira.py
2016-03-14 20:44:41 -07:00
Tomasz Kolek
a0512244b3
Moved beanstalk webhook into its own file beanstalk.py
2016-03-14 20:44:41 -07:00
Tomasz Kolek
6a3ab0605d
Moved github webhook into its own file github.py
2016-03-14 20:44:41 -07:00
Tomasz Kolek
8a0ed47751
moved webhooks to python package
2016-03-14 20:44:41 -07:00
Reid Barton
6c6dc1d81d
Allow create user API to create any user in an open realm.
2016-02-07 19:19:19 -08:00
Reid Barton
9735025167
Refactor logic around restricted_to_domain.
...
Add a function email_allowed_for_realm that checks whether a user with
given email is allowed to join a given realm (either because the email
has the right domain, or because the realm is open), and use it
whenever deciding whether to allow adding a user to a realm.
This commit is not intended to change any behavior, except in one case
where the Zulip realm's domain was not being converted to lowercase.
2016-02-07 10:54:52 -05:00
Reid Barton
0755b51c2e
Move create_user_backend into zerver.views.users.
...
Commit aa33a0da
moved users views into their own file, but missed this one.
2016-02-07 10:54:48 -05:00
Reid Barton
4e5f18407d
Add comment in create_user_backend about not needing to invite users first.
2016-02-07 10:52:50 -05:00
Tim Abbott
620411c0ea
Fix type mismatches in streams.py.
2016-02-03 19:25:19 -08:00
Tim Abbott
6c5cee2400
Cleanup 500s due to Google oauth2 errors.
...
These are user errors, albeit somewhat interesting ones, so they
should be logged (and return a user error response), not throw an
exception.
2016-02-02 23:08:20 -08:00
Tim Abbott
aad3bff193
Harden style rule for % comprehensions and fix existing errors.
2016-02-02 23:08:19 -08:00
Tim Abbott
5bacda3662
python3: Fix usage of .keys()/.values() to handle iterators.
...
This fixes the places where we use the result of .keys(), .items(),
and .values() that wouldn't work with an iterator to wrap them with
list().
2016-01-26 21:11:25 -08:00
Tim Abbott
6528b18ad3
Switch all urllib/urlparse usage to six.moves.urllib.
...
This provides Python 2+3 compatibility for our use of urllib.
Also add a test to avoid future regressions.
2016-01-26 21:09:43 -08:00
Reid Barton
ed412281d0
Fix typo in Google OAuth error message.
2016-01-12 09:32:09 -05:00
Tim Abbott
c661bc17fb
Fix support for having a unique, open realm.
...
The previous implementation didn't work because HomepageForm rejected
the email as not having a domain. Additionally, the logic in
accounts_register didn't work with Google auth because that code path
doesn't pass through accounts_home. Since whether there's a unique
open realm for the server is effectively a configuration property, we
can fix the bug and make the logic clearer by moving it into the
"figure out the user's realm" function.
2016-01-09 22:52:34 -08:00
Tim Abbott
85a8a742e2
Remove unused json_events_register route.
...
The browser registers for events via loading the home view, not this
interface, and this functionality is available via the API-format
register route anyway.
2016-01-09 20:01:38 -08:00
Tim Abbott
01f613751a
Limit DevAuthBackend user list display to 100 users.
...
This makes it possible to use DevAuthBackend when doing
performance/scalability testing on Zulip with many thousands of users.
It's unlikely that anyone testing this backend will find it valuable
to have more than 100 login buttons on the same page, and if they do,
they can always just change this limit.
Thanks to @dbiollo for the suggestion!
2016-01-09 20:01:37 -08:00
Tim Abbott
be9939b2ad
Fix tracebacks if HTTP_USER_AGENT is not specified.
...
Previously, we handled this correctly in some places (like the
decorators) but not in the website flows (accepting ToS, loading /).
2015-12-25 16:23:11 -08:00
Tim Abbott
e95739961f
Remove now obsolete /json/send_message route.
2015-12-12 18:14:08 -08:00
Tim Abbott
9cec758854
Remove now obsolete /json/subscriptions/add endpoint.
2015-12-12 18:14:08 -08:00
Tim Abbott
a79e89b28f
Cleanup remaining usage of % comprehensions without explicit tuples.
2015-12-05 15:29:42 -08:00
Josh Mandel
716e2d9184
Add integration for Travis CI.
2015-11-30 20:41:33 -08:00
Chris Chapman
44a9e1dff5
Fix for setting file upload size through settings file.
...
(Slightly tweaked by Tim Abbott to change the variable name, docs, and
default values).
Fixes #276 .
2015-11-24 06:06:46 -08:00
Tim Abbott
123d51e3aa
Add string validators to tutorial routes.
2015-11-24 05:20:37 -08:00
Tim Abbott
aa33a0daec
Move users views into their own file.
2015-11-24 05:20:37 -08:00
Tim Abbott
4d79083cf5
Move tutorial views into their own file.
2015-11-24 05:20:37 -08:00
Tim Abbott
f77b0bdb43
Move alert_words views into their own file.
2015-11-24 05:20:37 -08:00
Tim Abbott
e64a3d0fae
Move reporting views to their own file.
2015-11-24 05:20:37 -08:00
Tim Abbott
8526d02370
Move settings views into their own file.
2015-11-24 05:20:37 -08:00
Tim Abbott
37d4a11610
Move streams views into their own file.
2015-11-24 05:20:37 -08:00
Allie Jones
85809e6140
Add webpack build process.
2015-11-06 09:13:25 -08:00
Tim Abbott
33295180a9
Apply Python 3 futurize transform libmodernize.fixes.fix_unicode_type.
2015-11-01 09:35:06 -08:00
Tim Abbott
cd6f8e9191
Apply Python 3 futurize transform libmodernize.fixes.fix_map.
2015-11-01 09:35:05 -08:00
Tim Abbott
43abd83d1c
Apply Python 3 futurize transform lib2to3.fixes.fix_ws_comma.
2015-11-01 09:26:14 -08:00
Tim Abbott
8c34c40924
Apply Python 3 futurize transform lib2to3.fixes.fix_except.
2015-11-01 08:08:33 -08:00
Tim Abbott
90e61d3b61
Call process_new_human_user consistently when creating new users.
...
Previously we only did this when new human users were created via the
login process, which meant the management command to create a user did
not add the user to default streams (for example) and any future code
that might want to register a new Zulip user (such as the LDAP
integration) would need to import views/__init__.py in order to
properly set this up.
2015-10-15 09:16:58 -04:00
Tim Abbott
355e1bbd94
Move process_new_human_user and helpers from views to actions.py.
2015-10-15 09:16:58 -04:00
Darren Worrall
77fad7a16e
Add an api endpoint to fetch GOOGLE_CLIENT_ID
...
Further to #102 , this provides an endpoint suitable for mobile apps to
consume the GOOGLE_CLIENT_ID if configured.
2015-10-06 23:28:08 +00:00
Tim Abbott
a65656dd9d
Fix backwards-compatibility for old python-requests .json property.
...
In b59b5cac35
, we upgraded our Google
Oauth code to support new python-requests, but because Ubuntu precise
still has old python-requests, this broke the codepath for older
systems.
2015-10-01 18:54:17 -07:00
Jason Michalski
dafe69761e
Use stock emoji in the pagerduty integration
...
The pagerduty integration was using realm emoji. Use stock replacements
in the open source release.
2015-09-30 09:23:59 -07:00
Tim Abbott
bda9d78092
Use settings.ZULIP_ADMINISTRATOR as contact list for deactivated users.
2015-09-29 17:59:47 -07:00
Yuvi Panda
b59b5cac35
Fix TypeError in Google OAuth authenticator.
...
requests 1.0 changed response.json attribute to response.json()
instancemethod. The code wasn't updated to match that change,
causing a TypeError when attempting to use the Google OAuth
Authenticator backend.
This is fixed simply by using response.json() instead of response.json.
2015-09-26 13:51:27 -07:00
Tim Abbott
8967029729
Clean up GitHub API hook v1 comment.
...
(imported from commit 3777f2c9305bb8000e5ea4142bd2974805fa3c90)
2015-09-25 03:18:00 -07:00
Tim Abbott
f31816072d
Remove last customer-specific hack from github hook.
...
(imported from commit 897d9fd91e4f6c558d687f5ae6c360fad80574d9)
2015-09-25 00:47:15 -07:00
Tim Abbott
da5fe944e1
Set limits for export tool.
...
(imported from commit 0c582223f5b3ac4caf7685217719d4c32c5d2fae)
2015-09-24 19:34:28 -07:00
Tim Abbott
38ca08b18f
Add support for emphasize_branch_in_topic feature.
...
(imported from commit 35a447ee7b94b83bd1c9425c678167003a398ae3)
2015-09-20 15:21:12 -07:00
Tim Abbott
4a858d7d1b
Clean up api_github_v1 logic around issues stream.
...
(imported from commit d40997de594834d2ec6f8f190ad04b20bfd45a4c)
2015-09-20 13:21:15 -07:00
Tim Abbott
c5b44dc921
Simplify logic for the GitHub API hook.
...
(imported from commit 95dd8e16930f512b13a0413cf18b25694bd6ba66)
2015-09-20 13:21:15 -07:00
Tim Abbott
32878e8343
Enable GitHub issues messages for all realms.
...
(imported from commit 108fddc0b1f8b2d1ae74c09d1e96cff40d8c2ab1)
2015-09-20 11:49:03 -07:00
Tim Abbott
ade363f3af
Remove some GitHub hook hacks for old customers.
...
These features are in most cases possible to setup directly via our
GitHub services integration UI, and the customers aren't using Zulip
anymore, so this is worth doing to clean up the code.
(imported from commit 1e6f4ec523d85b6233a8e5b4eaa13eacfbe6e5f4)
2015-09-20 11:46:26 -07:00
Tim Abbott
b68d116e3a
Remove old is_super_user helper functions.
...
(imported from commit 85655ea9369f5dc309f6f687bac578924571c9ee)
2015-09-20 11:13:20 -07:00
David Roe
3ac95ddc1a
Add UserProfile flag to control whether we have a left side userlist.
...
Previously this was hardcoded for a single customer.
(imported from commit a6b7095050aa10cef976541505d9b09a35453f48)
2015-09-19 23:22:59 -07:00
Tim Abbott
21ac93ae9c
Remove the send_to_prod hack.
...
(imported from commit ba2a4d5e7d83769add979cc05996dbd8b014e8a2)
2015-09-19 21:54:51 -07:00
Tim Abbott
fcec80461b
Remove the SSO-only realm integration.
...
It's messy code, only one customer ever used it, and it's not in use
today.
(imported from commit af3f512ac6af74af66c588c7d40d699e98514d0a)
2015-09-19 21:54:51 -07:00
Neeraj Wahi
9f0a6272fa
Removed dbx_branding flag and Dropbox corner logo
...
(imported from commit d205898671643985e2de7c0d6d300bdca32cae21)
2015-09-19 15:16:42 -07:00
David Roe
3f7cb34b00
enterprise => voyager
...
(imported from commit 04be792bb480d5e5db1c91d296d1000cf1682571)
2015-08-21 10:33:35 -07:00
David Roe
edf7e732a2
ENTERPRISE => VOYAGER.
...
(imported from commit 4f8080b9f506a87ca40bef32e39de5218cba916a)
2015-08-21 10:33:35 -07:00
David Roe
d702ddb3cf
DEPLOYED => PRODUCTION
...
(imported from commit a7d365c07916c5103fc721c712db94f9af977640)
2015-08-21 10:33:35 -07:00
David Roe
63e576b811
STAGING_DEPLOYED => ZULIP_COM_STAGING
...
(imported from commit 25419979292218932c53cface59c1e8e2348a7c2)
2015-08-21 10:33:35 -07:00
David Roe
8778c4726a
Add settings.DEVELOPMENT as a complement of settings.DEPLOYED.
...
(imported from commit 0437140d9fee7eec7b28abe583cfe8cde3e07c21)
2015-08-21 10:33:35 -07:00
Reid Barton
ab9539cffe
Remove OpenID authentication
...
(imported from commit 70a859041a851ed10dc40cfc068330e472d2ed09)
2015-08-20 23:52:48 -07:00
Reid Barton
d88efef74b
Fix field name in get_bots_backend
...
Django 1.8 noticed that it was wrong.
(imported from commit d9578719e7713c1fd6756b80aac13f4d93f12fa7)
2015-08-20 23:15:45 -07:00
Reid Barton
0aab583bb1
Django 1.8 compatibility: transactions
...
- autocommit is now the default
- commit_on_success is now atomic
(imported from commit b6166ca666ff23d34f2871ca365ce3ec66b0fa86)
2015-08-20 23:15:45 -07:00
Anders Kaseorg
bded0d9d54
Remove corporate beta signup form
...
(imported from commit 1b3a0cd8a59a124905fa4cbd3121a78d23aeb3a2)
2015-08-20 18:40:34 -07:00
David Roe
3515a69e43
Remove public_streams_disabled.
...
(imported from commit 1d0c8db92bf8e4c44bd1c96063acfd6eea74925c)
2015-08-20 18:12:53 -07:00
Kate Buckner
4d0f7c7ea4
Add a user-visible setting for 24-hour time display.
...
(imported from commit d934824fd6b72e64a455aac9ff4585b262145f02)
2015-08-20 17:33:16 -07:00
David Roe
bfa70675cb
Remove notify_for_streams_by_default.
...
(imported from commit 9963c97ffec82fe7cf2921bd51422545c29a8915)
2015-08-20 17:33:16 -07:00
David Roe
086d8eee22
Add name_changes_disabled realm field.
...
(imported from commit 6b04ba2f7ad64c44f2ef18302f0fbd819259d632)
2015-08-20 15:29:46 -07:00
David Roe
5b7f3466ba
Add feature where only admins can invite new users.
...
This is controlled through the admin tab and a new field in the Realms table.
(imported from commit e78a6f48160e2a1bbc68d278beb726fe31515266)
2015-08-20 15:29:46 -07:00
David Roe
809efc4f2b
Add realm option to show or not show digest e-mail.
...
(imported from commit e9cfe519aa9f2857a1dcc7c75f5e1889834fcb86)
2015-08-20 15:29:45 -07:00
David Roe
e5cb2a468f
Enable Lab features for all users
...
(imported from commit 4e2658d28a5e02067ad472fec76c66f46592d520)
2015-08-20 15:29:45 -07:00
David Roe
90e2f5053f
Add mandatory topics as a realm option.
...
(imported from commit 929a884b8610669aa24a167367b899683e33a045)
2015-08-20 15:29:45 -07:00
David Roe
472898cfc6
Allow adding users to realms more easily in Dev VM.
...
Include new field on Realm to control whether e-mail invitations are required
separately from whether the e-mail domain must match.
Allow control of these fields from admin panel.
Update logic in registration page to use these fields.
(imported from commit edc7f0a4c43b57361d9349e258ad4f217b426f88)
2015-08-19 22:24:53 -07:00
David Roe
32783ebbfb
Admin users in red, at beginning, in dev login view
...
(imported from commit 530f0a5d26d5c2b637834281e45adb399852ae0a)
2015-08-19 22:24:53 -07:00
Jonathan Dahan
6f77e68622
Add GET /export endpoint, which dumps important tables in json.
...
Meant to be used in tandem with the manage.py import command.
The following sensitive data is scrubbed:
* user api keys
* user password hashes
* stream email keys
* invite-only streams
* messages from invite-only streams
* messages from users from other domains
(imported from commit 8e58dcdcb80ef1c7127d3ab15accf40c6187633f)
2015-08-19 15:31:08 -07:00
Tim Abbott
f792b67098
Fix send_to_prod redirect to not run on the Dev VM.
...
(imported from commit 6006c71348706d39740b0d6302df0a548e65b65e)
2015-08-18 20:17:47 -07:00
David Roe
46e224997e
Add a new dev login page for logging in without a password on the dev VM.
...
(imported from commit ac8f2504771c9907b7e92dc91cec5f7220ce951b)
2015-08-18 20:17:47 -07:00
Zev Benjamin
4d3f0cdc74
Encode unicode strings using UTF-8 before applying search highlighting
...
(imported from commit 45ded691fb89ccff12e76d5ca3b593ce3ff3f2e0)
2015-03-19 15:25:42 -07:00
acrefoot
0b7ef24a34
Add option to explicitly add pagerduty topic
...
(imported from commit 39ee1b37a807b19570d494f56bf7557228813ed5)
2015-02-10 23:56:03 -08:00
Leo Franchi
d865732e0d
Maintain two APNS connections and send correct notifications to each
...
Now we have 2 different Zulip apps out there, and they are signed with
two certs: Zulip and Dropbox. The Dropbox-signed apps are going to need
to be sent APNS notifications from the appropriate APNS connection
(imported from commit 6db50c5811847db4f08e5c997c7bbb4b46cfc462)
2015-02-11 06:57:25 +00:00
Leo Franchi
64a0b86917
pagerdudy -> pagerduty
...
(imported from commit 7cd25db67a8b20875edceafe881c872061a48fab)
2015-02-10 07:25:46 +00:00
Jason Michalski
3ad140e5a7
Convert all template strings to unicode
...
(imported from commit ddf60d53d30a02e1bb87fac35bb45768d17e378c)
2015-02-08 22:12:33 -08:00
Jason Michalski
179bf06940
The subject is an optional field in the pagerduty API
...
Pages from MP are using the description field not the subject field.
Include both in the page if given and don't fail if the key is missing.
(imported from commit 4351e5656d4ea025a03c07c8bb3bb5d406ef2d3d)
2015-02-08 21:30:19 -08:00
Jason Michalski
f4239d60ca
Add pagerduty webhook
...
(imported from commit 06219066b423f53d08094f3f97a98016e145b2a7)
2015-02-07 18:16:11 -08:00
Luke Faraone
a901677be1
Use a unicode string when grabbing SSO unames
...
(imported from commit 5742147003928e2207d9eac8704aa6090fb8cb8a)
2015-02-06 09:56:39 -08:00
Jason Michalski
6ba5271824
Fix the SSO path to support mirror dummies
...
The SSO flow which was never used on a realm with mirror dummies before.
Also change the redirect to stay on the same doain.
(imported from commit 0f1b8a8fcef82ae6eaa5a264686f98d62a683fac)
2015-01-30 20:07:13 -08:00
Jason Michalski
bb9ced6e57
Redirect users on the dropbox realm from stage to prod
...
This commit should only be pushed to stage after c290b630e has been
pushed to prod otherwise it will create a redirect loop.
(imported from commit 408407b845ded596705b1abd8ad13c0aedf6d732)
2015-02-06 00:07:06 -05:00
Jason Michalski
7b82db214c
Update the last SSO redirect to use the host header as well
...
(imported from commit 4392543d5ea4fd4c29c221338e8c5f7919e40b7c)
2015-02-05 23:49:33 -05:00
Jason Michalski
01d018ba31
Change the other use of EXTERNAL_HOST in the oauth2 flow
...
(imported from commit ff92fcbb43ee19bb2b1520e68c5f6768649246f5)
2015-02-05 23:32:59 -05:00
Jason Michalski
35d22949ed
Build the oauth redirect url with the host from the request
...
(imported from commit 972fed686b556bc8845cf7ae5bca555dc9cbeb13)
2015-02-05 23:14:04 -05:00
Jason Michalski
7e9c121ad3
Use the full_name if available
...
We were trying to default the users first name when using google auth,
but it was getting lost when rendering the form.
(imported from commit 710e0c2ce591488920458dca74209c75e7031abd)
2015-02-05 21:54:28 -05:00