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
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
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
6a7d3bd972
Removed obsolete node_types_schema
2016-07-07 11:59:28 +02:00
ff99134ac4
PEP8 formatting
2016-07-07 11:57:59 +02:00
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
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
694016f58b
Fixed issue creating non-sync nodes on home project.
2016-07-06 15:19:41 +02:00
d95004e62e
Node 'user' property now defaults to the current user ID.
2016-07-06 15:19:28 +02:00
447473303a
sync_project_groups: mention user ID in bad/ok group count
...
Makes it easier to grep & process the output
2016-07-06 14:12:32 +02:00
51a51e5782
sync_project_groups: also support identifying user by user ID
2016-07-06 12:55:40 +02:00
2be94bd504
Reformat
2016-07-06 12:50:07 +02:00
5b60dad831
Added script to add users to admin groups of projects they created.
...
For now, can only be run on individual users, identified by email address.
./manage.py sync_project_groups user@domain true
Replace 'true' with 'false' to just see the status and not update the DB.
2016-07-06 12:49:51 +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
40b29d7d40
Send Blinker signal when user roles change due to a PUT on the user.
2016-07-06 11:53:26 +02:00
3a33475efc
Refactored blender_id.validate_create_user()
...
Semantically still the same code.
2016-07-06 11:53:10 +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
4b1b02318b
Explicitly pass the application path to Git.
...
Without this, it doesn't work on our production environment.
2016-07-05 13:05:47 +02:00
def1a3d080
Send the Git revision to Bugsnag
...
This allows us to use the "ignore until a new version is deployed" feature.
2016-07-05 13:01:19 +02:00
dda0e2c868
When creating user from BlenderID, full_name defaults to username.
2016-07-05 12:36:32 +02:00
8a0fa8afd6
Log error when unable to create new user in mongodb.
2016-07-04 13:19:02 +02:00
7e85b32fc7
Gracefully handle missing node types when validating custom fields.
2016-07-04 12:36:54 +02:00
b507216d23
Increased log level for dynamic property validation errors
2016-06-30 18:38:57 +02:00
27d6289f17
Fixed KeyError in user_has_role()
2016-06-30 18:10:11 +02:00
1cd201dc89
Fix encoding issue in mng.py sync_role_groups
2016-06-30 17:48:13 +02:00
387cee227a
Set default picture on image asset and texture nodes.
2016-06-30 11:55:36 +02:00
c3e9d43838
Also deduct asset node content type on POST.
2016-06-30 11:55:20 +02:00
45a5019ba4
Embed project id/name/url in latest assets
2016-06-30 11:00:25 +02:00
b601644cca
Update parent node's _updated when updating/creating an asset
2016-06-29 16:44:00 +02:00
3bb0e588d8
Fixed unittests for disabled AB-testing
2016-06-29 16:43:41 +02:00
1e404351b0
Allow uploading files by any logged-in user, regardless of role
2016-06-29 15:33:56 +02:00
c9337b8d15
Taken out AB-testing for home project.
...
Home project is available to everybody!
2016-06-29 11:54:58 +02:00
4c73f98047
Revert "Tiny typo in comment (iff instead of if)"
...
'iff' means 'if and only if', it's not a typo.
This reverts commit 5355e4e359e4554a4590f5a2d3ca0f537dc02d02.
2016-06-28 15:11:11 +02:00
5355e4e359
Tiny typo in comment (iff instead of if)
2016-06-28 15:07:56 +02:00
5a4d98b352
Include parent in the projection for latest_assets
2016-06-28 15:07:21 +02:00
036d7a1b1e
Removed some superfluous debug logging.
2016-06-28 15:01:11 +02:00
57cf9a3547
Prevent home project without URL.
2016-06-28 15:01:02 +02:00
d652e6435d
Removed "pastebin" from home project descriptions.
2016-06-28 15:00:38 +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
e557443b85
PEP8 formatting
2016-06-28 14:12:29 +02:00
e442c6671b
Separated role-checking from enforcing those roles.
...
This allows other functions to use the same role-checking behaviour, and
separates policy from mechanism.
2016-06-28 14:12:29 +02:00
1513649cd8
Added function for None-safe fetching of user ID.
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
ba28f2ac3b
Home project: allow comment nodes
2016-06-28 14:12:29 +02:00