Commit Graph

79 Commits

Author SHA1 Message Date
32ad39aeb1 Moved node management to modules/node.py
No semantic changes, all should work identically as before.
2016-05-02 11:35:17 +02:00
6673e31675 Skip indexing of nodes of a private project 2016-04-29 13:37:01 +02:00
410cd1fd4c Moved user-related code from application to modules/users.py 2016-04-26 12:38:44 +02:00
2a2d35827c Added local accounts 2016-04-26 12:34:16 +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
e0460f8518 Don't crash when Algolia is unavailable, when updating user. 2016-04-12 15:21:37 +02:00
3d9fe76271 Added subclient token verification & storage. 2016-04-08 18:45:35 +02:00
465b145609 More flexible, less error-prone configuration system.
WARNING: make a backup copy of your local config.py before pulling
this change, as Git will overwrite it without warning.

The configuration defaults to deployment settings, allowing overrides.
Overrides are read from config_local.py and from the file pointed to
by the PILLAR_CONFIG env var.
2016-04-04 14:59:11 +02:00
077064b7d9 Skip not found attachments 2016-04-01 14:41:58 +02:00
73bb125e7b Added --quiet option to refresh_project_links mgmt command 2016-04-01 13:29:22 +02:00
56bf30c722 Validate authentication token on every request. 2016-03-31 11:10:01 +02:00
9bdba2bc15 Fix for attachment processing 2016-03-25 21:05:33 +01:00
1769f20620 Moved some file-specific code from app/__init__ to file_storage module. 2016-03-25 11:46:01 +01:00
90693595a6 Restored from modules.file_storage imports
A previous commit was causing functions not to be imported correctly
and would crash on runtime. For example file_storage.generate_link
would not be found.
2016-03-24 15:13:48 +01: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
8d9a23b7b9 PEP8 formatting for the entire project.
Conflicts:
	pillar/application/modules/file_storage.py
2016-03-21 12:26:11 +01:00
3334761ea7 PEP8 formatting 2016-03-15 16:17:27 +01:00
ab8b32af7f Nicer logging configuration.
How the timestamp is logged, and the requests handled by werkzeug too.
2016-03-15 10:30:29 +01:00
1593e5c09d Update to config.py.example 2016-03-15 10:20:28 +01:00
5c6bda1ba3 Tweaks to init code 2016-03-14 17:02:12 +01:00
f90f25d373 Upgraded gcloud package to 0.11.0 2016-03-14 14:51:46 +01:00
086284b883 Code cleanup and improved formatting 2016-03-14 12:13:49 +01:00
168eb848c3 Code cleanup for notifications
Also, moving most of the notification parsing on the pillar side, and
toggling it with the optional parse argument.
2016-03-09 16:55:59 +01:00
4c4ec6c89b Fixed authorization issue.
Authorization wasn't properly checked, allowing more than allowed.
2016-03-08 17:36:21 +01:00
d4ecf556ce Reduced log level for non-Pillar modules 2016-03-08 15:27:12 +01:00
bf614e0d54 Configured logging module.
It's currently configured very simply, to log to stderr and at DEBUG level
when the app is in debug mode, and INFO otherwise.
2016-03-08 09:24:57 +01:00
65f8bdc6c0 Introducing notifications 2016-03-05 23:22:59 +01:00
172e8a8ba0 Fixed bug in validate_token(), it now returns the validation status.
Also separated on-the-fly creation of user in our database into its
own function.
2016-03-04 18:46:53 +01:00
eb92d179e8 Introducing indexing for nodes 2016-02-26 16:17:38 +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
8a06634839 Introducing project_node_type_has_method
Check for a specific request arg, and check generate the
allowed_methods list for the required node_type.
2016-01-26 18:26:18 +01:00
1a5fcc1744 Refactored content of main __init__ into utils 2016-01-26 15:34:56 +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
4ce2d60df8 Added _format_name to handle existing extensions 2016-01-08 15:12:19 +01:00
ff174439c3 Tweaks to management functions 2016-01-08 14:20:07 +01:00
f9f411366d Management functions
- set_attachment_names assigns to GCS blobs names based on the node
they belong to
- files_verify_project reports conflicts in file ids
2016-01-08 12:55:21 +01:00
6bda83d5b5 Add format to filename
So that files have the correct extension when they are downloaded.
2016-01-07 20:27:43 +01:00
c6636e4ac7 Assign ContentDisposition to GCS items on save 2016-01-07 20:06:25 +01:00
12fd3caa7a Restored resource_parse_attachments 2015-12-02 11:52:20 +01:00
37e4333f08 Temporarily disable attachment parsing for resource 2015-12-01 19:28:58 +01:00
e87817533c Parse attachments also on resource request 2015-12-01 19:02:29 +01:00
0475f7b456 Allow attachments on nested properties 2015-12-01 18:23:33 +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
9eb7eb3ada Fix for signup with short usernames 2015-11-18 11:17:46 +01:00
423758f447 Fix for attachments url parsing loop 2015-11-16 16:53:42 +01:00
5b6feac154 Introducing image attachments
Before returning a response, check if the 'attachments' property is
defined. If yes, load the file (for the moment only images) in the
required variation, get the link and build a Markdown representation.
Search in the 'field' specified in the attachment and replace the
'slug' tag with the generated link.
2015-11-16 12:32:42 +01:00
3550813302 Refactoring for more meaningful var names 2015-11-13 17:39:54 +01:00
11f8769eb8 Fixes to check_permissions
This allows nodes to have their permissions correctly evaluated for
logged in users.
2015-11-13 17:32:50 +01:00
8596466d49 New default setting for email_communications 2015-11-12 01:19:59 +01:00