Commit Graph

43 Commits

Author SHA1 Message Date
e600d87592 Secure write access to /users endpoint
- Admins can PUT everything
- Users can only PUT themselves
- The 'auth' field is always taken from the original, and never overwritten
  by the PUT. It can be missing from the request, so you can GET and then
  PUT the same data.
- Nobody can POST or DELETE users
2016-04-26 12:38:44 +02:00
5c04cdbd6e Secure read access to /users endpoint.
- auth field is never returned
- unauthenticated access is rejected
- non-admin users can only access themselves
2016-04-26 12:38:44 +02:00
2a2d35827c Added local accounts 2016-04-26 12:34:16 +02:00
31e802619e Support soft-deleting projects.
See http://python-eve.org/features.html#soft-delete for more info.
2016-04-25 16:14:05 +02:00
5116b74d1d Updated Eve to 0.6.3
This also updates Cerberus to 0.9.2 and simplejson to 3.8.2.

I've also changed the way we get to the application object, by replacing
   from application import app
with
   from flask import current_app
2016-04-25 16:14:05 +02:00
4b9dd29ad5 Added /p/create entry point to create new projects.
This requires the user to be logged in. The project will be owned by that
user.
2016-04-19 16:50:46 +02:00
d808b76d65 Store is_subclient_token bool in token collection. 2016-04-15 16:27:24 +02:00
ce242e1de3 Added manage.py command to refresh (almost) expired links.
manage.py refresh_project_links  5672beecc0261b2005ed1a33 -c 4

This refreshes the oldest 4 links of that project.
2016-04-01 13:03:27 +02:00
37037f3c2c Store generated links in MongoDB, along with expiry datetime.
Links are only regenerated after they have expired. For backward
compatibility the links are also generated when there is no expiry
or link. Every file has only one expiry timestamp for all its links.

In the future we might want to inspect the used projection, to see
whether the client needs those links at all (prevents unnecessary
regeneration), and to force inclusion of the expiry timestamp when
links are requested.
2016-03-21 15:17:09 +01:00
65f8bdc6c0 Introducing notifications 2016-03-05 23:22:59 +01:00
20ba507095 Introducing activities model 2016-03-05 23:22:59 +01:00
eb92d179e8 Introducing indexing for nodes 2016-02-26 16:17:38 +01:00
03ae481e7b Renamed default database to eve 2016-02-25 15:01:17 +01:00
d76c47afd5 Improving initial installation process
This is still work in progress, but the new manage.py setup_db function
allows for guided creation of basic groups and for the admin user.
2016-02-25 12:43:46 +01:00
3308751ed4 Introducing external video encoding
It is now possible to specify an encoding backend (at the moment only
zencoder) to take care of video variations encoding. Files transfer
happens directly on CGS (although any storage backend can be
supported). New requirements is the Zencoder Python library.
2016-02-22 16:48:53 +01:00
c7b6e798c0 Introducing Algolia search for users
With the new dependency, algoliasearch, we can push and store on the
Algolia service a limited set of properties from the Users collection.
2016-02-10 16:13:07 +01:00
f341d33faf Fix reference for embedded project in file schema 2016-01-27 17:50:39 +01:00
e295165864 Introducing Projects
We are now using a more document-based approach to define projects. In
the new projects collection we store the definition of a project and
embed the node_types. This allows for custom node_types for every
single project. This change has a certain impact on the custom
validators, as well as the permission computation.
Further, Cerberus 0.9.1 is required in order to properly support the
allow_unknown statements in the projects_schema definition.
2016-01-25 16:32:50 +01:00
559589f927 Introducing file variations
We are ditching the excessively normalised data structure for files.
Now file variations are embedded in the original file document for
improved performance.
2015-11-25 16:16:09 +01:00
b81ba226eb Removed maxlength on description 2015-11-16 15:17:40 +01:00
f329f2ff45 Added settings to User schema 2015-11-12 00:34:34 +01:00
a661c1c107 Renamed path to file_path in File properties 2015-11-05 18:47:36 +01:00
1819886af5 Require full_name for user 2015-11-05 00:23:48 +01:00
5f818fdc39 Tweaks to user model
Mainly checking for unique usernames.
2015-11-04 16:22:47 +01:00
9c18b5cc9f Added project property for files
This property can be combined to the backend for locating the file
within the backed. Originally introduced to support Google Cloud
Storage (where every project is store in its own bucket, named after
the project id).
2015-11-04 12:57:36 +01:00
ac4c74a323 Adding project property to nodes 2015-10-28 20:34:14 +01:00
2f51d20ee7 Added subscriber as allowed role for user model 2015-10-19 19:09:21 +02:00
9a727c8207 Tweaks to settings.py 2015-10-16 17:49:15 +02:00
4f6c0e27ce Added url to post node properties 2015-10-15 14:49:15 +02:00
d26b3a738a Tweaks for new user data structure 2015-10-13 23:17:00 +02:00
2ad8c5458a New settings for user model
Removed first_name and last_name in favor of full_name. Also tweaked
response handling from validation endpoint.
2015-10-13 19:40:25 +02:00
72d2f9adfe Public item methods for organisations and groups 2015-10-11 23:30:41 +02:00
018ddfa20b New authentication logic
We are replacing the existing mixed BaseAuth TokenAuth authentication
logic and permissions system with a more streamlined solution, based on
user id and groups checking against node_type stored permissions. Such
permissions can be overridden on the node level (and complement the
public GET operations on the node entry point).
2015-10-11 22:20:18 +02:00
6d32dc2894 Removed unused binary_files entry point 2015-10-08 12:46:38 +02:00
0d7f92006e Cleanup of settings.py 2015-10-08 09:24:02 +02:00
ae5797146d Email attribute for organization 2015-10-05 19:57:53 +02:00
44302b6623 Introducing the comment node_type 2015-10-05 19:55:56 +02:00
c2e0ae4002 File processing
Introducing the asset of type file creation. This involves making a
node collection entry of type asset, as well as a file collection
entry, plus all the needed variations if such file is an image or a
video. Further, depending on the storage backend (pillar or other) we
synchronise the files there using rsync. Currently this functionality
is available only via pillar-web, since a web interface is needed to
upload the file in a storage folder, which is shared between the two
applications.
2015-09-24 15:45:57 +02:00
9ee8d9a20b Tweaks to manage.py for import script 2015-09-12 01:37:16 +02:00
2470af6ab2 ContentType to content_type rename 2015-09-11 15:16:10 +02:00
aa3f8e6837 Migration script and utils for CDN link protection 2015-09-10 12:47:29 +02:00
7cecfbe4e0 Improved support for files
We updated the way files are stored in the files collection. Any
derived variation of a file (different encoding or size) is stored as
new record, referencing the original as a parent.
We also added a generate_link method, which is in charge of providing
the client API with the actual link to the backend specified by the
file.
2015-09-08 15:06:45 +02:00
1830d04400 Renaming the project to Pillar. 2015-08-31 18:22:50 +02:00