33 Commits

Author SHA1 Message Date
bd13d89817 Added permission check to DELETE of nodes. 2017-07-13 17:29:46 +02:00
2ad8c5186c Storage backends: added exists() method
This method returns whether the file exists on the backend.
2017-06-06 15:33:05 +02:00
a7d3ba24b4 Refactor cli scripts in submodules 2017-05-24 19:41:35 +02:00
5e721c61b9 Added function to easily remove someone from a group. 2017-05-24 10:56:53 +02:00
59a95450e5 Updated Eve, Flask, and Werkzeug. Adjusted code to make Pillar work again.
Eve     : 0.6.3   → 0.7.3
Flask   : 0.10.1  → 0.12.2
Werkzeug: 0.11.10 → 0.11.15

Also updated some secondary requirements.
2017-05-18 15:46:02 +02:00
ad9a981cda Added p.a.users.add_user_to_group() function 2017-05-12 13:55:55 +02:00
c854ccbb4b Generic PATCH handler class.
A class-based approach is easier to extend than the function-based approach
used in the nodes. That one is still there, though -- might look at it
at a later time. This handler is primarily for Flamenco.
2017-05-09 14:08:35 +02:00
fdaf4af31a Modernised some unit tests 2017-05-05 14:40:37 +02:00
69d7c5c5ce Allow service accounts to be email-less
This removes the ability of updating service accounts through the CLI
(something we never used anyway), now that service accounts cannot be
uniquely identified by their email address.
2017-05-05 14:34:18 +02:00
1a54b723aa Reworked subscription/demo role management from web to API level.
In the old situation, users had to be able to change their own roles. This
is inherently insecure.
2017-05-04 17:49:18 +02:00
d0557445cd Fix privilege escalation leak
A PUT request on /api/user/{user-id} by the user themselves would allow
too much, and would allow self-granting of roles (including admin),
group membership (so join any arbitrary project) and pretend to be
service accounts.
2017-05-04 12:48:30 +02:00
bd3f8d597a Allow upload of videos > 1080p
Videos that are larger than 1920x1080 pixels are scaled down so that they
fit that size. Care is taken to keep the width a multiple of 16 pixels and
the height a multiple of 8.
2017-03-31 14:52:58 +02:00
b36dc63335 Added simple mocking test for GCS 2017-03-22 16:43:17 +01:00
563bb2c244 Added unittest for Bucket.copy_to_bucket() 2017-03-22 16:14:06 +01:00
6b526f6b53 Fixed bug in local file storage URL generation. 2017-03-22 16:05:38 +01:00
2e41c074b5 Python 3.6 compatibility: bytes vs strings stuff
These changes mostly revolve around the change in ObjectId constructor
when running on Python 3.6. Where on 2.7 the constructor would accept
12- and 24-byte strings, now only 12-byte bytes and 24-character strings
are accepted. Good thing, but required some changes in our code.

Other changes include hashing of strings, which isn't supported, so they
are converted to bytes first, and sometimes converted back afterwards.
2017-03-22 15:49:51 +01:00
bced6cae68 Ran 2to3 on unittests, same sort of manual fixups as before 2017-03-22 15:49:51 +01:00
ab375b2126 Moved node_setattr() from Attract to Pillar 2016-11-09 12:50:30 +01:00
fe4d70c0d1 CLI upgrade_attachment_schema: also remove attachments form_schema
Previously they would have {'attachments': {'visible': False}}, but this
is no longer needed.
2016-11-01 16:47:55 +01:00
a38e053c1a Added CLI command to create blogs. 2016-11-01 16:47:55 +01:00
0929a80f2b New data structure for attachments. 2016-11-01 16:47:55 +01:00
e1678537c0 Editing comments via PATCH on pillar-web, and some other comment fixes 2016-10-20 16:47:04 +02:00
e71e6a7b32 API for editing comments via PATCH 2016-10-20 16:22:11 +02:00
3afeeaccd0 Removed permission keys from node type definitions.
This prevents replace_pillar_node_type_schemas() from overwriting existing
permissions.
2016-10-20 13:05:43 +02:00
eea934a86a Added username to public user fields 2016-10-19 16:57:17 +02:00
96c9e12f7f doc_diff() optionally no longer reports differences between falsey values.
If falsey_is_equal=True, all Falsey values compare as equal, i.e. this
function won't report differences between DoesNotExist, False, '', and 0.
2016-10-12 17:09:48 +02:00
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
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