252 Commits

Author SHA1 Message Date
7c310e12ef Added util function to compute the difference between two dicts. 2016-10-12 16:01:30 +02:00
407aefb9ad Added CLI command for moving top-level nodes between projects.
Also introduces a slightly nicer way to get the database interface, and
an object-oriented way to allow dependency injection.
2016-09-27 12:57:57 +02:00
7968c6ca37 Added node_type_utils to assign permissions to certain node types.
This separates "mechanism" from "policy".
2016-09-23 17:13:26 +02:00
68666f0650 Updated unittest code so that we can create 100% valid projects.
This means also creating a user and groups so that the references are
valid.
2016-09-08 12:03:17 +02:00
eb7b875122 Copying files to other backend now works 2016-08-26 15:52:02 +02:00
04c9c010f0 p.view_node(): check node_id for validity, before sending it to the API
This prevents a pillarsdk.exceptions.MethodNotAllowed exception, which
would result in a 500 Internal Server Error on the frontend.
2016-08-24 14:49:30 +02:00
2e0ba4c6cd test_sdk: load BlenderDesktopLogo.png from the correct path 2016-08-23 14:32:59 +02:00
2c5dc34ea2 Introducing Pillar Framework
Refactor of pillar-server and pillar-web into a single python package. This
simplifies the overall architecture of pillar applications.

Special thanks @sybren and @venomgfx
2016-08-19 09:19:06 +02:00
ed863447cf Comment rating: fixed bug where new ratings weren't returned on no-op. 2016-07-28 12:08:40 +02:00
6a7d25cec7 Using PATCH to do comment rating. 2016-07-27 17:18:58 +02:00
2d72c96a45 Sort HDRi files by their image file size. 2016-07-26 17:22:07 +02:00
7880fb6968 Added a group_hdri node type.
This node type serves the same purpose for hdri as the group_texture
serves for the texture nodes.
2016-07-20 15:22:33 +02:00
49bd2720fa Oops. 2016-07-20 14:25:22 +02:00
4a72b377bd Include HDRi projects in /bcloud/texture-libraries
This depends on the version of the Blender Cloud Addon, which will be sent
as Blender-Cloud-Addon HTTP header in a future version of the addon.
2016-07-20 14:12:54 +02:00
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
2d5a538ad6 Added query string support to AbstractPillarTest.client_request() 2016-07-15 11:23:09 +02:00
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
9cd7198005 Make shared nodes world-gettable 2016-07-13 12:28:01 +02:00
53c0eec8f1 PEP8 formatting 2016-07-13 12:27:50 +02:00
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
5d26de633c Limit uploadable file size to 32 MiB for non-subscribers. 2016-07-08 12:34:49 +02:00
a322aee0c7 Added file upload support to AbstractPillarTest.client_request 2016-07-08 12:34:49 +02:00
8a7c7afc3c Bugfix 2016-07-08 12:34:49 +02:00
bfba44e5b8 Merged test_home_project.py and test_bcloud_home_project.py 2016-07-08 12:34:49 +02:00
d357345db6 Missed one more 'theatre_link' 2016-07-07 19:05:14 +02:00
0f8cfc89b3 Nodes now have only one short code 2016-07-07 15:41:42 +02:00
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
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
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
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
d95004e62e Node 'user' property now defaults to the current user ID. 2016-07-06 15:19:28 +02:00
57e2f01153 Bug fix: users loose their project groups after getting role.
The badger service erased the user's groups when assigning subscriber
group membership.
2016-07-06 12:35:16 +02:00
91238aacb7 Managing home project permissions when granting/revoking subscriber/demo role.
This is hooked into the badger service using a Blinker signal. This signal
also needs to be sent from a PUT on the user document.
2016-07-06 11:05:24 +02:00
dda0e2c868 When creating user from BlenderID, full_name defaults to username. 2016-07-05 12:36:32 +02:00
27d6289f17 Fixed KeyError in user_has_role() 2016-06-30 18:10:11 +02:00
387cee227a Set default picture on image asset and texture nodes. 2016-06-30 11:55:36 +02:00
3bb0e588d8 Fixed unittests for disabled AB-testing 2016-06-29 16:43:41 +02:00
57cf9a3547 Prevent home project without URL. 2016-06-28 15:01:02 +02:00
18c7ca17e9 Allow Blender Sync access to non-subscribers. 2016-06-28 14:25:13 +02:00
5e506abac9 AB-testing for home project
Only allows access to the home project to user with role 'homeproject'.
2016-06-28 14:12:29 +02:00
83618a5639 Home project: allow comment nodes 2016-06-28 14:12:29 +02:00
1a48c37bd6 Allow resuscitation of deleted home projects. 2016-06-28 14:12:29 +02:00
a104f54fb0 Force URL of home projects to 'home' 2016-06-28 14:12:29 +02:00
9ed73eb7dd Home project: allow projections. 2016-06-28 14:12:29 +02:00
b4faf2245e Home project: create it when user tries to GET it. 2016-06-28 14:12:29 +02:00
3980133100 Moved creation of standard groups in unittests 2016-06-28 14:12:29 +02:00
36a2e028d4 Added sync_role_groups management command.
This ensures that group membership is consistent with the user's roles.
The roles are leading in this.
2016-06-14 16:41:37 +02:00
ba1f8a4101 Badger service: also manage group membership
For the subscriber, demo and admin roles, the badger service now also
manages group membership for the role-specific groups.
2016-06-14 15:39:22 +02:00
222d9efc89 Implemented badger service endpoint
Also added manage.py command to create badger service accounts.
2016-06-06 16:34:50 +02:00
fb020ae4b4 Added unit test for refreshing links upon fetching a file document. 2016-05-31 17:56:24 +02:00