Commit Graph

1252 Commits

Author SHA1 Message Date
Guillaume Ayoub
9aefc500ec Merge pull request #461 from Unrud/patch-27
Remove old code
2016-08-05 17:48:03 +02:00
Guillaume Ayoub
7703008d8f Merge pull request #460 from Unrud/patch-25
Run hook while storage is still locked
2016-08-05 17:47:38 +02:00
Unrud
bfb7aec7be Test deletion of root collection 2016-08-05 17:40:47 +02:00
Unrud
f4eb143ba8 use tempfile to delete collection 2016-08-05 17:40:47 +02:00
Unrud
5a9d956b49 delete atomic and durable
See #440
2016-08-05 17:40:47 +02:00
Unrud
9dd241a54b Add test for deletion of collection 2016-08-05 17:40:47 +02:00
Unrud
6d77e24028 Remove old code
This was missed while merging #457 and #459.
2016-08-05 17:05:32 +02:00
Unrud
65af0592d3 Run hook while storage is still locked 2016-08-05 16:58:03 +02:00
Guillaume Ayoub
0f6e98a512 Fix setup.py 2016-08-05 16:27:55 +02:00
Guillaume Ayoub
294eb5aa15 Don't install pytest-runner when not needed 2016-08-05 16:22:55 +02:00
Guillaume Ayoub
50438bc2c0 Remove fixed TODOs 2016-08-05 02:57:17 +02:00
Guillaume Ayoub
8682504c6e Strip empty lines from content 2016-08-05 02:25:15 +02:00
Guillaume Ayoub
26e1c9ba89 Fix collection creation with PUT request 2016-08-05 02:24:52 +02:00
Guillaume Ayoub
8ac3ce1a89 Clean many, many things 2016-08-05 02:14:49 +02:00
Guillaume Ayoub
263f31c84b Merge branch 'Unrud-rights' 2016-08-04 23:35:08 +02:00
Guillaume Ayoub
92a0027ae1 Merge branch 'rights' of https://github.com/Unrud/Radicale into Unrud-rights 2016-08-04 23:35:01 +02:00
Guillaume Ayoub
2eaedf448f Merge pull request #457 from Unrud/atomiccreate
Atomic creation of collections and atomic PROPPATCH
2016-08-04 22:55:15 +02:00
Guillaume Ayoub
9ba4a47897 Merge pull request #458 from Unrud/flock
Use flock locks for storage locking
2016-08-04 22:31:22 +02:00
Unrud
8ce6d1af30 Use flock locks for storage locking
These locks are compatible with the command line utility flock,
which comes preinstalled with most Linux distributions.
2016-08-04 06:15:05 +02:00
Unrud
066b5994d1 Improve rights checking and request handlers
* Access rights are checked before the storage is locked and
    collections are loaded.
  * DELETE sends 410 instead of doing nothing or crashing if the target
    doesn't exist.
  * GET always returns 404 if the target doesn't exist.
  * GET doesn't crash if a collection without tag property is requested.
  * MKCOL and MKCALENDAR send 409 if the target already exists.
  * MOVE checks if the target collection of an item actually exists and
    sends 409 otherwise.
  * PUT doesn't crash if a whole collection that doesn't exist yet is
    uploaded and ``content-type`` is ``text/vcard`` or
    ``text/calendar``.
  * PUT distinguishes between simple items and whole collections by the
    following criteria: Target is a collection; Parent exists; Parent
    has the tag property set; Parent contains other items. Before only
    the first two criteria where used, which was very unrelieable. #384
  * PROPPATCH is only allowed on collections and 409 is send otherwise.
  * ``Rights.authorized`` takes a path instead of a collection.
  * ``Collection.discover`` only returns items in ``path``, that
    actually exist. #442
2016-08-04 06:08:08 +02:00
Unrud
ae89082c24 Atomic creation of collections 2016-08-03 15:50:55 +02:00
Unrud
e34d1c46cd Move collections into collection-root folder
This is required for atomic creation and deletion of the "/" collection.
2016-08-03 15:50:38 +02:00
Unrud
bd7641699e Atomic PROPPATCH 2016-08-03 14:45:52 +02:00
Unrud
de510148a0 *args and **kwargs for test collection 2016-08-03 14:35:50 +02:00
Unrud
0fc7f787a8 Remove test_folder configuration
It's not used.
2016-08-03 14:34:36 +02:00
Guillaume Ayoub
b71664b322 Return UNAUTHORIZED for NOT_FOUND PROPFINDs 2016-08-02 17:24:04 +02:00
Guillaume Ayoub
76b859c28e Rename .collection.props into .Radicale.props 2016-08-02 16:58:44 +02:00
Guillaume Ayoub
2f202d14e0 Fix .collection.props 2016-08-02 16:57:20 +02:00
Guillaume Ayoub
5b04ba18a8 Hide collection.props 2016-08-02 16:51:50 +02:00
Guillaume Ayoub
da22778ce3 Merge pull request #456 from Unrud/props
Properties inside of collection
2016-08-02 16:50:23 +02:00
Unrud
13c693ba35 Properties inside of collection
* Creation and deletion of collections can be atomic.
  * The properties file of the root collection is not outside of the
    filesystem_folder.
  * It's easier to delete and move collections by hand.
  * This breaks backward compatibility.
2016-08-02 16:35:38 +02:00
Guillaume Ayoub
1ffc171f35 Always return collections home sets 2016-08-02 16:27:18 +02:00
Guillaume Ayoub
5ed60ce09d Always return current-user-principal 2016-08-02 15:43:31 +02:00
Guillaume Ayoub
3e52f34309 Remove pylint 2016-08-02 14:39:20 +02:00
Guillaume Ayoub
301bb552d7 Cosmetics 2016-08-02 14:37:39 +02:00
Guillaume Ayoub
d322d3f394 Clean the user's collection creation code 2016-08-02 14:00:42 +02:00
Guillaume Ayoub
04010ff8d3 Merge pull request #455 from Unrud/home
Creating addressbooks and calendars in DAVdroid
2016-08-02 13:51:29 +02:00
Guillaume Ayoub
71be1a56b8 Change find_available_file_name into private method 2016-08-02 12:11:38 +02:00
Guillaume Ayoub
a7f078eb54 Change find_available_file_name into a method 2016-08-02 11:16:24 +02:00
Guillaume Ayoub
880744ada7 Merge pull request #454 from Unrud/uniq
Check if file name already exists
2016-08-02 11:12:30 +02:00
Unrud
81b04890f1 Create principal collection automatically 2016-08-02 08:04:12 +02:00
Unrud
39d38f36a5 Check if file name already exists
The chances are pretty low but maybe the RNG is bad or something
2016-08-02 07:33:47 +02:00
Unrud
d5008672c5 Principal associated properties only on principal collections
This misguides DAVdroid into creating new calendars and addressbooks in /
2016-08-01 20:48:57 +02:00
Unrud
03cbcee5cd / is not a principal 2016-08-01 20:46:57 +02:00
Unrud
7aa481aaa1 Return / for principal-collection-set
From RFC3744: This protected property of a resource contains a set of URLs that identify the root collections that contain the principals that are available on the server that implements this resource.
2016-08-01 20:44:04 +02:00
Unrud
8f91190949 Remove duplicate code 2016-08-01 20:42:03 +02:00
Guillaume Ayoub
6b30870be5 Minor cleanups
Everything works fine with Apple clients now.
2016-08-01 19:00:57 +02:00
Guillaume Ayoub
b517818749 Don't reject everybody from "/" with owner_only
Fix 407.
2016-08-01 18:59:47 +02:00
Guillaume Ayoub
6bfdcbafec Cosmetics 2016-08-01 12:50:51 +02:00
Guillaume Ayoub
711ecf5df2 Merge pull request #451 from Unrud/removewellknown
Remove /.well-known
2016-08-01 12:20:55 +02:00