Sybren A. Stüvel
a248e3285c
Added optional project.header_node node ID reference.
...
This can be used to show a video on the project page in Pillar-Web.
2016-07-19 16:09:49 +02:00
Sybren A. Stüvel
54f3ca6924
project_manage_users: Prevent internal error when the user can't be found.
2016-07-19 14:03:58 +02:00
Sybren A. Stüvel
fe148e1e6b
Simplified settings by introducing _node_embedded_schema.
...
This follows the same style as the already-existing _file_embedded_schema.
2016-07-19 12:33:42 +02:00
Sybren A. Stüvel
3ddfbddf1a
Added deploy.sh script, which performs an automated deploy on production.
2016-07-19 12:15:20 +02:00
Sybren A. Stüvel
9b3e75b9b9
Nodes: embed 'short_link' when 'short_code' is present and not empty.
...
This prevents calls to /nodes/<node-id>/share to get the short link.
2016-07-15 11:23:13 +02:00
Sybren A. Stüvel
2d5a538ad6
Added query string support to AbstractPillarTest.client_request()
2016-07-15 11:23:09 +02:00
Sybren A. Stüvel
b880034fda
Using before_returning_node_permissions in before_returning_node_resource_permissions
2016-07-15 11:09:24 +02:00
Sybren A. Stüvel
642cbafa09
Added urler service, which can fetch the URL of any project.
2016-07-13 16:52:48 +02:00
Sybren A. Stüvel
34e3cb1e7d
Management command for refreshing home project permissions.
2016-07-13 15:59:38 +02:00
Sybren A. Stüvel
a844f1ddda
Home project: allow commenting on nodes.
...
This is only set up correctly for new home projects. Existing home projects
should be migrated using a yet-to-be-written script.
2016-07-13 15:40:41 +02:00
Sybren A. Stüvel
158c7665e4
Removed some debug logging
2016-07-13 15:34:30 +02:00
Sybren A. Stüvel
b6ef96022c
Added OPTIONS call to get allowed options on node types
...
This allows us to check whether a user is allowed to comment on a project
without requiring access to the project itself.
2016-07-13 15:09:40 +02:00
Sybren A. Stüvel
1f4e9ec7f3
authorization: split part of has_permissions() into compute_allowed_methods()
...
This allows other code to re-use the effective permission computations.
2016-07-13 15:08:34 +02:00
Sybren A. Stüvel
da938da38d
Bugfix and some extra debug logging
2016-07-13 15:07:40 +02:00
Sybren A. Stüvel
9cd7198005
Make shared nodes world-gettable
2016-07-13 12:28:01 +02:00
Sybren A. Stüvel
53c0eec8f1
PEP8 formatting
2016-07-13 12:27:50 +02:00
Sybren A. Stüvel
d996760017
Removed node type permissions from EXAMPLE_TEST_PROJECT
...
This makes the test project mimick actual projects more.
2016-07-13 12:27:42 +02:00
Sybren A. Stüvel
22d758b608
Typo in requirements.txt
2016-07-13 09:36:42 +02:00
Sybren A. Stüvel
8d4ae27c85
Merge branch 'production'
2016-07-08 14:03:07 +02:00
Sybren A. Stüvel
660a13cab6
sync_role_groups: Iterating over users, instead of user/role combos.
...
This fixes all roles & group memberships at once, and fixes a bug where
the script had to be re-run to apply multiple role changes on a single
user.
2016-07-08 14:01:46 +02:00
Sybren A. Stüvel
3711678fba
Changed confusing log message
2016-07-08 14:01:43 +02:00
Sybren A. Stüvel
a8f5267f03
Made a management.py command 'badger <action> <user_email> <role>'
...
The action can be 'grant' or 'revoke'.
2016-07-08 14:01:37 +02:00
Sybren A. Stüvel
6f952cde01
sync_role_groups: Iterating over users, instead of user/role combos.
...
This fixes all roles & group memberships at once, and fixes a bug where
the script had to be re-run to apply multiple role changes on a single
user.
2016-07-08 13:03:43 +02:00
Sybren A. Stüvel
a5d7b20b45
Changed confusing log message
2016-07-08 12:50:07 +02:00
Sybren A. Stüvel
8c94af0427
Made a management.py command 'badger <action> <user_email> <role>'
...
The action can be 'grant' or 'revoke'.
2016-07-08 12:34:49 +02:00
Sybren A. Stüvel
5d26de633c
Limit uploadable file size to 32 MiB for non-subscribers.
2016-07-08 12:34:49 +02:00
Sybren A. Stüvel
a322aee0c7
Added file upload support to AbstractPillarTest.client_request
2016-07-08 12:34:49 +02:00
Sybren A. Stüvel
8a7c7afc3c
Bugfix
2016-07-08 12:34:49 +02:00
Sybren A. Stüvel
1c03ea8dec
Don't encode video and don't send uploaded files to GCS when TESTING.
...
Unittests shouldn't connect to external systems. We could mock GCS and
Zencoder, but that's a lot more work, and takes time to maintain.
2016-07-08 12:34:49 +02:00
Sybren A. Stüvel
bfba44e5b8
Merged test_home_project.py and test_bcloud_home_project.py
2016-07-08 12:34:49 +02:00
Sybren A. Stüvel
1c18699de8
Importing werkzeug.exceptions instead of each individual exception
2016-07-08 12:34:49 +02:00
Sybren A. Stüvel
78e4474f94
Disabled uninteresting debug log
2016-07-08 12:32:37 +02:00
Sybren A. Stüvel
0b8aff1054
sync_project_groups: gracefully handle invalid object IDs.
...
Otherwise a mistake at the CLI will create a bugsnag.
2016-07-08 12:08:52 +02:00
Sybren A. Stüvel
f6eab4878f
Log ensure_valid_link() stuff to separate logger.
2016-07-08 12:08:01 +02:00
Sybren A. Stüvel
896e2bc147
Override content type before creating file document in MongoDB
2016-07-07 19:05:42 +02:00
Sybren A. Stüvel
d357345db6
Missed one more 'theatre_link'
2016-07-07 19:05:14 +02:00
Sybren A. Stüvel
a1b26fe911
Removed 'theatre link' from short link info.
...
The short link should always link to the theatre mode anyway.
2016-07-07 17:00:24 +02:00
Sybren A. Stüvel
0f8cfc89b3
Nodes now have only one short code
2016-07-07 15:41:42 +02:00
Sybren A. Stüvel
3f3e9ac7db
Nodes can now be shared with /nodes/<node_id>/share endpoint.
...
A POST will create a short link (if it doesn't exist already), whereas
a GET will return the short link for the node.
The endpoint will return a dict like:
{'short_code': 'XXXXXX',
'short_link': 'https://blender.cloud/r/XXXXX ',
'theatre_link': 'https://blender.cloud/r/XXXXX?t '}
2016-07-07 15:17:56 +02:00
Sybren A. Stüvel
2bdfbaea13
Test tearDown: remove all 'application.xxx' submodules from sys.modules
...
This ensures that the modules are reloaded for every test, for better
test separation.
2016-07-07 14:59:22 +02:00
Sybren A. Stüvel
c871089eab
Added AbstractPillarTest.{get,post,put,post,delete} utility functions.
...
These functions set the correct Content-Type header when JSON is given,
add a resp.json() function that also checks the response mime type,
and adds the correct Authorization header.
2016-07-07 14:58:34 +02:00
Sybren A. Stüvel
251f5ac86a
Added app.utils.str2id() to convert IDs on URLs to ObjectId.
...
Raises a BadRequest exception when the ID is malformed.
2016-07-07 14:56:30 +02:00
Sybren A. Stüvel
be1deb7eb6
Moved MongoDB index creation to app startup.
...
At the first request to Pillar, the application will create all missing
indices. This also happens in unittests, so that we get the correct
behaviour for 'unique' indices.
2016-07-07 14:55:07 +02:00
Sybren A. Stüvel
d5683afb84
manager command 'setup_db_indices': Adds missing database indices.
...
This does NOT drop and recreate existing indices, nor does it reconfigure
existing indices. If you want that, drop them manually first.
2016-07-07 12:44:06 +02:00
Sybren A. Stüvel
6a7d3bd972
Removed obsolete node_types_schema
2016-07-07 11:59:28 +02:00
Sybren A. Stüvel
ff99134ac4
PEP8 formatting
2016-07-07 11:57:59 +02:00
Sybren A. Stüvel
ff8d5c96b7
stream_to_gcs: Return a BadRequest(400) error when content type is missing
...
We're using uploaded_file.content_type.startswith('image/'), which
fails with an AttributeError if uploaded_file.content_type is None. We
now check for this and properly return info about the missing conten type
to the caller.
2016-07-07 11:11:06 +02:00
Francesco Siddi
782ac9ac1e
Disable webm variation creation for video assets
...
Encoding webm video is very time consuming and currently h264 is
supported by most browsers. Once we switch to a different encoding
backend we can reintroduce it, if needed, along with multiple
resolutions.
2016-07-07 10:42:05 +02:00
Sybren A. Stüvel
694016f58b
Fixed issue creating non-sync nodes on home project.
2016-07-06 15:19:41 +02:00
Sybren A. Stüvel
d95004e62e
Node 'user' property now defaults to the current user ID.
2016-07-06 15:19:28 +02:00