Tim Abbott
305189956b
update_message_flags: Log number of messages updated.
2016-07-12 19:12:49 -07:00
Steve Howell
3923f94a2b
Remove unused code path in avatar() endpoint.
2016-07-12 17:37:02 -07:00
Tomasz Kolek
d0066c37ff
Add bitbucket2 integration.
...
Bitbucket changed the format of their API. The old format is still
useful for BitBucket enterprise, but for the main cloud verison of
Bitbucket, we need a new BitBucket integration supporting the new API.
2016-07-12 17:34:34 -07:00
Tim Abbott
3647973069
update_message_backend: Reorganize validation checks.
...
The new organization more clearly does the permission check first.
2016-07-10 18:01:59 -07:00
Tim Abbott
05632b68e1
edit: Add validation for setting empty content.
2016-07-10 18:01:59 -07:00
Tim Abbott
211a166abc
message edit: Move new topic non-empty check to view.
2016-07-10 18:01:59 -07:00
Rishi Gupta
43c2f35776
Add realm setting to disable message editing.
...
This is controlled through the admin tab and a new field in the Realms
table. This mirrors the behavior of the old hardcoded setting
feature_flags.disable_message_editing. Partially resolves #903 .
2016-07-10 11:57:24 -07:00
Steve Howell
c680c6a981
Removed unused to_non_negative_float() function.
2016-07-09 07:37:13 -07:00
Umair Khan
043ae8ad65
Upgrade to Django-Pipeline==1.6.8.
2016-07-09 07:09:55 -07:00
Taranjeet
a8a4caf2c0
zerver: Fix lines with length greater than 120.
2016-07-08 11:41:43 -07:00
Eklavya Sharma
6c3f1bb967
beanstalk.py: Encode and decode strings correctly.
2016-07-07 12:42:51 -07:00
Eklavya Sharma
26b8e7357a
zerver/views/messages.py: Operate on bytes in highlight_string.
2016-07-07 12:42:51 -07:00
Eklavya Sharma
63d55bdd86
zerver/views/__init__.py: decode b64encoded ccache.
...
Convert b64encoded ccache to `str` before passing to
subprocess.check_call.
2016-07-07 10:02:08 -07:00
Umair Khan
035fceb814
Add dynamically loaded language dropdown.
2016-07-04 11:56:02 -07:00
Eklavya Sharma
9772a512cb
Use abstract types in annotations.
2016-07-04 03:01:32 +05:30
Kartik Maji
f8bb7503e6
Add ability to pin streams to top of the streams sidebar list.
...
Based on work by Lauren Long, with some tweaks by tabbott.
2016-06-30 22:26:09 -07:00
Vishnu Ks
1cbd39b768
Unique link generator for realm creation.
2016-06-30 15:52:41 -07:00
Rishi Gupta
17b6d136d5
Add Semaphore webhook integration.
2016-06-29 16:36:19 -07:00
Tim Abbott
abc2c03b0f
Fix missing 'current_url' value in registration flow.
...
This fixes some tracebacks I got while testing the Zulip htpasswd SSO
functionality.
I think that this stopped working as a result of the Jinja2 migration.
2016-06-28 23:05:38 -07:00
acrefoot
a36e5d4987
Add get_auth_backends endpoint to API.
...
We would like to know which kind of authentication backends the server
supports.
This is information you can get from /login, but not in a way easily
parseable by API apps (e.g. the Zulip mobile apps).
2016-06-27 18:30:34 -07:00
Tim Abbott
e72f41cdec
Remove old prototype data import/export tool.
...
This prototype from Dropbox Hack Week turned out to be too inefficient
to be used for realms with any significant amount of history, so we're
removing it.
It will be replaced by https://github.com/zulip/zulip/pull/673 .
2016-06-27 13:47:08 -07:00
Tim Abbott
b2a24e0306
Revert "Add authorization check before serving files."
...
This reverts commit e985b57259
.
This commit will break production when we next do a release, because
we haven't done a migration to create Attachment objects for
previously uploaded files.
2016-06-27 12:09:56 -07:00
rahuldeve
e985b57259
Add authorization check before serving files.
2016-06-27 11:24:35 -07:00
rahuldeve
674def30ee
Add support for serving files using API authentication.
...
Also remove 'get_uploaded_file' view function and the corresponding
old '/user_upload/' url pattern.
2016-06-27 11:00:41 -07:00
Tim Abbott
79570f99c2
json_upload_file: Remove unnecessary has_request_variables.
2016-06-27 10:29:30 -07:00
Tim Abbott
8272fb4a94
zerver.views.upload: Move upload functions later in file.
2016-06-27 10:28:09 -07:00
Eklavya Sharma
d7a83ed019
zerver/views/__init__.py: Type annotate a variable.
2016-06-27 17:52:37 +05:30
Eklavya Sharma
63a5323259
zerver/views/streams.py: Type annotate variables.
2016-06-27 17:52:22 +05:30
dhanus
1169329a71
Annotate zerver/views/webhooks/github.py.
2016-06-26 08:13:49 -07:00
Eklavya Sharma
85cb3e6103
zerver/views/webhooks/github.py: Make exception string str.
...
Passing a unicode string to Exception can sometimes fail.
Convert it to str to prevent that.
2016-06-26 08:13:49 -07:00
Eklavya Sharma
a32f83b182
zerver/views/webhooks/github.py: Fix string literals.
...
Change some string literals to unicode.
2016-06-26 08:13:49 -07:00
Eklavya Sharma
fa4adf0c62
zerver/views/webhooks/bitbucket.py: Fix an annotation.
2016-06-26 08:13:49 -07:00
Eklavya Sharma
36c2214d94
zerver/views/webhooks/bitbucket.py: Fix string literals.
...
Convert some strings literals to unicode.
2016-06-26 08:13:49 -07:00
Vishnu Ks
7d654a26c8
Casper test for realm creation.
2016-06-25 10:50:12 -07:00
Vishnu Ks
20adcbc64b
Make send_registration_completion_email return the Confirmation object.
2016-06-24 17:47:56 -07:00
Vishnu Ks
8350b89798
Add support for custom error message in realm-creation-failed template.
2016-06-24 17:47:56 -07:00
Tim Abbott
6d71c25a0f
accounts_register: Stop using _ as dummy variable.
...
This conflicts with internationalization.
2016-06-24 17:47:31 -07:00
acrefoot
e4ed9195dc
Remove rest_dispatch hack and optimize imports.
...
For a long time, rest_dispatch has had this hack where we have to
create a copy of it in each views file using it, in order to directly
access the globals list in that file. This removes that hack, instead
making rest_dispatch just use Django's import_string to access the
target method to use.
[tweaked and reorganized from acrefoot's original branch in various
ways by tabbott]
2016-06-24 16:11:03 -07:00
Vishnu Ks
574a304b12
Mention invite emails are printed in console in dev.
...
This is part 2 of #1046 .
2016-06-23 17:07:11 -07:00
Tim Abbott
f39c9161fe
Fix fetching user API keys via settings page when using LDAP backend.
...
Previously, json_fetch_api_key was hardcoding a check using Zulip's
built-in password functionality, rather than using authenticate().
2016-06-21 14:58:25 -07:00
Tomasz Kolek
9ae68ade8b
Add is_webhook option to authentication decorats.
...
Modified:
authenticated_rest_api_view
authenticated_api_view and validate_api_key.
2016-06-21 11:47:38 -07:00
Tim Abbott
80d92c1651
Add comment documenting confusing list_to_streams code.
2016-06-21 11:45:35 -07:00
Vishnu Ks
ad1c3894d9
Add interface for creating new realms.
...
This is controlled by settings.OPEN_REALM_CREATION; if that setting is
off, this feature doesn't do anything.
2016-06-17 16:15:28 -07:00
kunall17
007eee6061
Add route to fetch emails for mobile passwordless login.
...
[Tweaked by tabbott to rename API to explicitly support not just
Android]
2016-06-17 11:03:19 -07:00
kunall17
7ea0eaed1c
Add passwordless login for mobile app development.
...
[Tweaked by tabbott to rename API to explicitly support not just
Android].
2016-06-17 10:58:33 -07:00
Vishnu Ks
01c9bb2d5e
Make name_changes_disabled() work with no argument.
2016-06-16 17:13:59 -07:00
Tomasz Kolek
76cbe89613
Add IFTTT integration.
2016-06-16 15:30:45 -07:00
John Hergenroeder
16a19226f6
Add linter check for redundant REQ whence argument.
2016-06-16 13:53:39 -07:00
Tomasz Kolek
4e51a86ea4
Add updownio integration.
2016-06-14 12:14:07 -07:00
Tomasz Kolek
14d69348d3
Add Airbrake integration.
2016-06-13 20:36:40 -07:00
Eklavya Sharma
6f5ed6e7c9
Fix annotations clashing with Stream model fields.
2016-06-13 20:01:02 +05:30
Eklavya Sharma
9d7a2fdf9d
zerver/views/streams.py: Fix annotations.
...
Mainly fix `str` to `text_type` and use abstract containers.
2016-06-13 20:01:01 +05:30
Eklavya Sharma
10f2ec043d
Fix zerver.lib.utils.generate_random_token.
...
generate_random_token used to return a value of type six.binary_type
and its return type was annotated as `str`. This commit fixes that
by making it return a value of type `six.text_type` and updating
the annotation accordingly.
Also fix clashing annnotations.
2016-06-12 09:30:53 -07:00
Babak
ad895eb690
Annotate zerver/views/report.py.
2016-06-11 18:42:37 -07:00
Vishnu Ks
77ec6217eb
Add validation for private message recipients.
...
The function will reject messages where recipients aren't either a
member of the realm or a member of cross_realm_user_emails.
Fixes : #930 .
2016-06-11 11:24:45 -07:00
Eklavya Sharma
53084fe03c
Use text_type as type of cache keys and update users.
...
This changes the type annotations for the cache keys in Zulip to be
consistently text_type, and updates the annotations for values that
are used as cache keys across the codebase.
2016-06-11 09:10:34 -07:00
Vishnu Ks
b926826ea1
Remove default_stream addition and deletion from update_stream_backend.
...
Default stream addition/removal is done via the /default_stream REST
endpoints.
2016-06-10 16:59:15 -07:00
rahuldeve
fa13582ffb
Serve uploaded files through get_uploaded_file in development.
...
Previously, uploaded files were served:
* With S3UploadBackend, via get_uploaded_file (redirects to S3)
* With LocalUploadBackend in production, via nginx directly
* With LocalUploadBackend in development, via Django's static file server
This changes that last case to use get_uploaded_file in development,
which is a key step towards being able to do proper access control
authorization.
Does not affect production.
2016-06-09 22:58:25 -07:00
Tim Abbott
13bac1cc2a
Fix serving files uploaded to S3.
...
This was broken by the refactoring to realm_id_str in:
a261a6bbac
.
2016-06-09 21:55:50 -07:00
rahuldeve
3e3462da0d
Refactor zerver.lib.upload.upload_message_image_through_web_client.
...
upload_message_image_through_web_client -> upload_message_image_from_request
2016-06-09 21:09:12 -07:00
medullaskyline
39eaf02b40
Annotate zerver.views.webhooks.taiga.
2016-06-09 17:08:55 -07:00
Vishnu Ks
f9f31b79d0
Make default_streams web controllable.
...
Fixes : #665
2016-06-09 15:24:32 -07:00
rahuldeve
ed83bb7f54
Refactor zerver.views.upload.
2016-06-08 09:49:14 -07:00
Hyunchel Kim
b0702c62fc
Annotate zerver.views.messages partially.
2016-06-07 21:09:30 -07:00
Tim Abbott
bc2961d3ac
Refactor file upload routes to their own file.
2016-06-06 16:09:05 -07:00
Evan Palmer
8afeb7d8ce
Annotate webhooks/transifex.py, webhooks/yo.py.
2016-06-05 17:01:53 -07:00
Daw-Ran Liou
7f0709b65c
Annotate zerver.views.webhooks.freshdesk
...
Change the comments into docstrings.
Modified the return type of parse_freshdesk_event to always return a
list of str.
2016-06-05 15:56:27 -07:00
Dalek-Sec
c457f551ea
Annotate zerver/views/webhooks/crashlytics.py
2016-06-05 15:54:13 -07:00
medullaskyline
7e30de04ca
Annotate zerver.views.webhooks.pingdom.
2016-06-05 15:52:53 -07:00
medullaskyline
4c1da236ad
Annotate zerver.views.webhooks.pagerduty.
2016-06-05 15:47:33 -07:00
Daw-Ran Liou
4428287846
Annotate zerver.views.webhooks.stash.
2016-06-05 15:42:25 -07:00
Hyunchel Kim
b79cad0404
Annotate zerver.views.webhooks.teamcity
2016-06-05 15:11:45 -07:00
Daw-Ran Liou
26d067fc97
Annotate zerver.views.webhooks.pivotal.
2016-06-05 14:57:53 -07:00
medullaskyline
2369d48a9b
Annotate zerver.views.webhooks.newrelic.
2016-06-05 14:52:20 -07:00
Evan Palmer
4bf81b58b4
Annotate zerver/views/webhooks/zendesk.py.
2016-06-05 14:50:52 -07:00
Hyunchel Kim
de34dd1187
Annotate travis webhoook function.
2016-06-05 14:46:26 -07:00
medullaskyline
158914aa98
Annotate zerver.views.webhooks.jira.
2016-06-05 14:36:39 -07:00
Hyunchel Kim
bc87685ea6
bitbucket: Correct return type in annotation.
2016-06-05 14:33:31 -07:00
Max
86fb6467e7
Add annotations to avatar.py, db.py, logging_util.py, unminify.py.
...
Also, fixed a a small type annotation in users.py because email must
be a string because emails don't support UTF-8 at this time (according
a comment in gravatar_hash in avatar.py).
2016-06-05 12:38:20 -07:00
Daw-Ran Liou
90a2dead46
Annotate zerver/views/webhooks/deskdotcom.py.
2016-06-05 11:53:44 -07:00
Deborah Hanus
a261a6bbac
Annotate zerver/views/__init__.py.
...
Also fix typing errors in a few related files.
[with tweaks from tabbott]
2016-06-05 11:34:19 -07:00
Daw-Ran Liou
c9bb93b0d2
Annotate zerver/views/webhooks/beanstalk.py.
2016-06-05 10:54:23 -07:00
Dalek-Sec
2bcf313a85
Added MyPy types to zerver/views/webhooks/codeship.py
2016-06-04 22:03:41 -07:00
Daw-Ran Liou
0265968ea2
Annotate zerver/views/user_settings.
2016-06-04 17:41:59 -07:00
Reid Barton
cf93c8bce0
Annotate zerver/views/webhooks/bitbucket.py.
2016-06-04 17:02:59 -07:00
Daw-Ran Liou
8bbd93011d
Annotate zerver/views/users.py.
2016-06-04 17:00:53 -07:00
Tomasz Kolek
8411b2e574
Add Crashlytics integration.
2016-06-04 15:18:42 -07:00
Tomasz Kolek
093e5a96d4
Add Transifex integration.
...
Fixes : #810 .
2016-06-04 14:52:57 -07:00
David Adamec
9e8ea93d3d
Add annotations for zerver/lib/validator.
2016-06-03 23:53:49 -07:00
Tim Abbott
03debdf82f
Fix malformed error message when creating invalid Realm Emoji.
...
Thanks to Greg McCoy for his help finding this bug.
2016-06-03 23:12:36 -07:00
Ashish Kumar
9b990e3bd0
Type annotation of zerver/views/alert_words.
...
[Tweaked by tabbott to annotate the REQ variables the new way]
2016-06-03 08:07:58 -07:00
Oren Leaffer
c2ce5119c6
Annotate zerver.views.tutorial.
2016-06-02 18:49:27 -07:00
Pei-Wei Wu
8d2733ae8c
Add mypy type annotations to zerver/views/streams.py.
2016-06-02 15:44:43 -07:00
Ashley Dunn
7826aa7e7f
Type annotation of zerver/views/realm_emoji.
2016-06-02 14:01:28 -07:00
Umair Khan
08fbd57245
[i18n] Make error messages translatable.
...
Make all strings passing through `json_error` and `JsonableError`
translatable.
Fixes #727
2016-05-31 07:40:42 -07:00
Tim Abbott
960144a49e
Desupport using uninstantiated REQ with has_request_variables.
...
This makes life difficult for doing static type annotations, and
didn't make the code look that much better anyway.
2016-05-31 07:31:15 -07:00
Tim Abbott
baec0f12cf
Add a proper annotation for REQ in streams.py.
2016-05-30 11:41:16 -07:00
Eklavya Sharma
efab224bd1
zerver/lib/actions.py: Remove unneeded `return {}` statements.
2016-05-29 04:26:17 -07:00
Tomasz Kolek
8c18b8947f
Add bot_type field to UserProfile.
...
This is intended to support creating different types of bots with
potentially limited permissions.
2016-05-19 22:37:37 -07:00
Aristeidis Fkiaras
3ee210d9e8
Add setting to only allow admins create new streams.
...
Fixes : #691 .
Thanks to Preston Hansen for work on this feature!
2016-05-18 18:53:13 -07:00