Commit Graph

261 Commits

Author SHA1 Message Date
Unrud 4f37e90e20 Some clients expect collections to end with /
Compatibility with InfCloud/CalDavZAP/CardDavMATE
2016-08-07 17:50:04 +02:00
Guillaume Ayoub 8ac3ce1a89 Clean many, many things 2016-08-05 02:14:49 +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
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 bd7641699e Atomic PROPPATCH 2016-08-03 14:45:52 +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 04010ff8d3 Merge pull request #455 from Unrud/home
Creating addressbooks and calendars in DAVdroid
2016-08-02 13:51:29 +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 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 6bfdcbafec Cosmetics 2016-08-01 12:50:51 +02:00
Florian Mounier 39823f8909 Add a pre_filtered_list method in collection. This allow filters optimizations 2016-07-08 11:37:30 +02:00
Guillaume Ayoub 21461ddb4e Fix name_from_path 2016-07-06 17:11:12 +02:00
Florian Mounier 221379ef85 Sort imports 2016-07-04 14:32:33 +02:00
Guillaume Ayoub fd3b0718fd Fix coding style 2016-07-01 16:44:12 +02:00
Guillaume Ayoub c294477aee Support recurring items in time filters
Fix #33.
2016-07-01 16:40:43 +02:00
Guillaume Ayoub 4e8f518cbb Remove spaces from empty lines 2016-06-26 21:23:29 +02:00
Nicolas Bonfante dfc215b63f solving bug when trying to filter an Event on a DATETIME which have no timezone 2016-06-24 14:02:35 +02:00
Nicolas Bonfante 4872ea5d58 correcting bug in test vjournal 2016-06-15 18:09:09 +02:00
Cedric Boscher e4e1d81f9f debug on tests 2016-06-15 18:01:19 +02:00
Nicolas Bonfante 1613c4955f adding test for Vjournal filtering 2016-06-15 16:17:51 +02:00
Nicolas Bonfante 38845da762 solve bug in vjournal time filter 2016-06-15 15:48:35 +02:00
Cedric Boscher a5d5cc8b2c debug VTODO and first tests running 2016-06-15 15:45:27 +02:00
Cedric Boscher 2957b40473 clean code 2016-06-15 10:16:44 +02:00
Cedric Boscher 21ea648a44 Merge branch 'master' of github.com:Kozea/Radicale 2016-06-15 09:56:16 +02:00
Cedric Boscher 7de63f8335 VTODO first implementation 2016-06-15 09:56:05 +02:00
Nicolas Bonfante e1f3045f1f adding VJournal method 2016-06-15 09:55:30 +02:00
Guillaume Ayoub 40406359e5 Merge pull request #423 from Unrud/patch-17
Resolve naming conflict
2016-06-13 15:08:33 +02:00
Unrud 3e1e680bbc Use correct attribute name 2016-06-10 00:02:07 +02:00
Unrud 74d84e0c91 Resolve naming conflict 2016-06-09 23:52:05 +02:00
Guillaume Ayoub 248fc7e9e3 Implement time-range filters for events 2016-05-30 14:53:20 +02:00
Guillaume Ayoub fef9f0abc6 Support param-filter 2016-05-27 14:44:59 +02:00
Guillaume Ayoub 69ec2891fa Remove at_once 2016-05-25 14:05:05 +02:00
Guillaume Ayoub 68b72f55eb Merge pull request #398 from untitaker/unbound
Fix UnboundLocalError
2016-05-18 22:47:37 +02:00
Markus Unterwaditzer eea6ccb573 Fix UnboundLocalError 2016-05-18 22:43:56 +02:00
Guillaume Ayoub a8fda1aedf Cut long lines 2016-05-18 22:41:05 +02:00
Guillaume Ayoub 6769629314 Remove useless empty function 2016-05-18 20:22:36 +02:00
Guillaume Ayoub 45576d7474 Handle text-match filters
Related to #33.
2016-05-18 20:21:03 +02:00
Guillaume Ayoub a28df4dd4b Reorganize filters
Related to #33 and #372.
2016-05-06 17:53:02 +02:00
Guillaume Ayoub 2f97d7d1e1 Remove global state about configuration and logs
Many things have been changed to make this possible, probably leading to
many hidden bugs waiting to be found.

Related to #122.
2016-04-22 11:37:02 +09:00
Jasper Bryant-Greene 0670aa9fb4 Corrected calendar-timezone code in xmlutils.py 2016-04-21 10:40:36 +05:30
Guillaume Ayoub 6db946080e Cosmetics 2016-04-21 09:12:00 +09:00
Markus Unterwaditzer 7f2d1c00c4 Unbreak tag filters 2016-04-20 20:17:05 +02:00
Guillaume Ayoub ecf53c5e1e Merge branch 'master' of github.com:Kozea/radicale 2016-04-20 07:50:58 +09:00
Guillaume Ayoub 3a9bcc7555 Add etag property to items
Related to #380.
2016-04-20 07:49:03 +09:00
Markus Unterwaditzer 1b1ba421ff Fix double slash in REPORT responses
When doing REPORTs with absolute paths as hrefs, the response hrefs
contain a double slash at the beginning. This breaks URL parsers and
makes them assume they have a URL without protocol of the format
`//example.com/foo/bar/`.
2016-04-19 23:19:22 +02:00
Guillaume Ayoub bf8bd90bcb Fix removal of base_prefix in multiget requests 2016-04-19 10:44:02 +09:00
Guillaume Ayoub 65659fc909 Improve WebDAV compatibility
Add getlastmodified and getcontentlength properties, and fix nested
collections support. Fix #321.
2016-04-18 09:11:00 +09:00
Guillaume Ayoub 99544fcf80 Allow the creation of empty collections
Fix #201
2016-04-17 13:58:56 +09:00
Markus Unterwaditzer e8c1defe6a Update PROPPATCH to new storage API 2016-04-13 23:02:00 +02:00
Markus Unterwaditzer 472d016d1e Fix crash when fetching nonexistent href 2016-04-13 22:56:57 +02:00
Guillaume Ayoub e586569b31 Fix a lot of details 2016-04-12 18:21:18 +02:00
Guillaume Ayoub 406027f3c9 Change the Collection API
The new API used comes from vdirsyncer, as proposed by @untitaker in
issue #130.

The code has been tested and works with the (too simple) unit tests, and
with Lightning and DAVdroid. Many things are broken and a good part of
the code has not be ported to the new API yet. TODOs have been added
where the application is known to be broken.
2016-04-11 20:11:35 +02:00
Guillaume Ayoub 41e319a8b8 Merge ical and storage modules 2016-04-10 02:08:07 +02:00
Guillaume Ayoub 7a0e267f19 Better collection discovery 2016-04-09 15:11:47 +02:00
Guillaume Ayoub 44ba2c36a7 Merge branch 'master' of https://github.com/hadleyrich/Radicale 2016-04-08 15:05:56 +02:00
Guillaume Ayoub 434cb533e9 Remove Python 2 support 2016-03-31 19:57:40 +02:00
igogold aa04aa04b7 Fix privilege set for read only collection 2016-03-04 11:05:13 +05:00
Giel van Schijndel a06e4ef075 PROPFIND: correctly handle 'propall' and 'propnames'
* Handle both the explicit <propall/> and its implicit variants
  - the missing request-body case was already handled
  - the empty request-body case wasn't
  - the explicit (a request-body containing <propall/>) wasn't either
 * <propnames/> now lists all retrievable properties

Signed-off-by: Giel van Schijndel <me@mortis.eu>
2015-06-26 13:33:10 +02:00
Hadley Rich 54d71355d1 Change xmlutils propfind to return readonly calendars 2015-06-04 11:23:01 +12:00
Liam ba5d38d09b Fix typo 2015-05-15 13:47:44 +01:00
Guillaume Ayoub ced7e76ba0 Small style fixes 2015-05-01 10:31:25 +02:00
Guillaume Ayoub 675f9d1f87 Merge pull request #255 from jspricke/fix_FutureWarning
Fix FutureWarning, explicitly test prop_element for None
2015-05-01 10:22:38 +02:00
Markus Unterwaditzer 1126f318af Fully fix #258
If I do REPORT requests, the following line would raise a KeyError:

    items = [collection.items[name]]

Wrapping it with a try-except block obviously fixes that issue.

At least for REPORT requests, Radicale now also returns proper HTTP
status codes when items or just its properties couldn't be found.
2015-02-08 17:52:55 +01:00
Guillaume Ayoub 2c4b335fad Clean the ical API 2015-02-07 17:26:20 +01:00
Jochen Sprickerhof c43b473c4a Fix FutureWarning, explicitly test prop_element for None 2015-01-23 14:41:41 +01:00
Guillaume Ayoub abb1de883b Allow PUT requests to change the whole calendar (see #250) 2015-01-05 15:45:24 +01:00
Guillaume Ayoub f2fc02501c Merge pull request #226 from meyerd/master
Only iterate props in REPORT request if they are there
2014-12-14 16:50:22 +01:00
Felix Lange 20b1a29149 fix color support
5f2245c35f introduced an additional alias for the
http://apple.com/ns/ical namespace. this can cause problems.
2014-11-11 21:26:29 +01:00
Dominik b561d1428b only iterate props in REPORT request if they are there 2014-10-25 20:28:50 +02:00
Markus Unterwaditzer 4859436ba8 Return user basepath for current-user-principal
Fix #196

The way to do collection discovery described in
http://stackoverflow.com/a/11673483 doesn't work well with Radicale:

1. current-user-principal returns /user/calendar.ics/

2. PROPFINDs asking for calendar-home-set will return the URL that was
   used in the request, which is still /user/calendar.ics/

3. The final PROPFIND with Depth: 1 is supposed to list all collections,
   but because the request is done with a collection URL, Radicale returns
   the items for the "calendar.ics" collection which might or might not
   exist.
2014-08-09 23:01:13 +02:00
Guillaume Ayoub 0822f99650 Allow full URLs in href tags for REPORT requests
Fixes #192
2014-08-05 15:42:39 +02:00
Mathieu Dupuy a94984b653 revert of 00674fe 2014-07-25 15:41:56 +02:00
Markus Unterwaditzer 030436327a Fix #143
Since all iCalendar objects have VCALENDAR inside them, that tag is
absolutely meaningless (in this context).
2014-06-04 22:55:35 +02:00
Guillaume Ayoub 45f8e76643 Revert "Follow the depth in REPORT requests"
This reverts commit 9556508b2a.
2014-03-05 19:26:42 +01:00
Guillaume Ayoub 9556508b2a Follow the depth in REPORT requests 2014-03-04 01:37:14 +01:00
Christoph Polcin 387e1fee76 Fix calendar/addressbook-home-set in PROPFIND response 2014-01-19 19:35:53 +01:00
Christoph Polcin d09b16c5ad Fix principal-collection-set in PROPFIND response 2014-01-19 19:35:53 +01:00
Christoph Polcin 83db27303f Respond to all authenticated PROPFIND requests 2014-01-19 19:35:46 +01:00
Christoph Polcin 2ddec14535 Fix principal URLs in PROPFIND response 2014-01-05 21:22:53 +01:00
Guillaume Ayoub fe1cd1d44d Use collection URL instead of main folder as user's main URL (see #32) 2013-10-24 15:31:49 +02:00
Jean-Marc Martins 484933d4b6 Merge branch 'master' of github.com:Kozea/Radicale 2013-08-28 10:48:15 +02:00
Guillaume Ayoub 00b498677d Merge pull request #48 from jspricke/color
Add color support
2013-08-27 08:02:38 -07:00
Jean-Marc Martins 056dec5819 Decode urls in XML (fix #26) 2013-08-27 16:43:36 +02:00
Jochen Sprickerhof 5f2245c35f Add color support
You can change the default color by changing the props (.props file for
the filesystem storage backend).
2013-08-17 12:16:37 +02:00
Guillaume Ayoub 70f8ee94d9 Fix supported-calendar-component-set for collection's components 2013-06-17 11:30:26 +02:00
Guillaume Ayoub dd7f886fcc Add content type for collection items 2013-05-14 13:18:12 +02:00
Guillaume Ayoub b7aa5c8d14 Fix collection properties set by proppatch or mk* requests 2013-05-13 23:19:22 +02:00
Guillaume Ayoub 69e2eb0908 Store the supported-calendar-component-set property in the calendar properties 2013-05-10 14:56:17 +02:00
Guillaume Ayoub bf8e874e4d Merge *base_prefix config keys into base_prefix (fixes #996) 2013-04-30 14:02:17 +02:00
Guillaume Ayoub eaa969a05c Merge pull request #24 from vuntz/radicale-in-subdir
Allow running radicale in a subdir, as well as in a subdir behind a proxy
2013-04-26 08:33:12 -07:00
Guillaume Ayoub 406bb6e8cc Update copyright years 2013-04-26 01:28:03 +02:00
Jonathan Dupart 7a96578ca4 Typo: missing comma
sync-collection and expand-property where returned concatenated in
PROPFIND answers.
2013-04-09 00:42:25 +02:00
Vincent Untz 74590cfd0c Add proxy_base_prefix option to help run in a subdir behind a proxy
I have a setup where Radicale is running as the normal process, and
nginx is acting as proxy for Radicale for requests under /radicale/.
This means that all requests to nginx that go to /radicale/ are sent to
a radicale server that expects requests coming at /.

Obviously, all the href need to have the /radicale/ prefix to have
things work. So a new option proxy_base_prefix is added to allow having
such a setup.

All href that are sent in the replies will have the proxy_base_prefix
prepended.
2013-03-18 18:20:06 +01:00
Vincent Untz 0dbf71f57f Fix issues with base_prefix option 2013-03-18 18:13:28 +01:00
Fabrice Bellet 54bda5594c Handle use in a subdir. Patch from Clint Adams <clint@softwarefreedom.org> adapted from http://redmine.kozea.fr/issues/996 2013-03-18 18:10:13 +01:00
Guillaume Ayoub b6b48b5af7 Typo 2013-02-27 10:36:54 +01:00