Commit Graph

261 Commits

Author SHA1 Message Date
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
Christoph Polcin 9972897d75 accepts PROPFIND whitout request body 2013-02-26 00:45:08 +01:00
Guillaume Ayoub 4c064bcf35 Clean rights from file and remove tests 2012-09-15 09:08:01 +02:00
Matthias Jordan db708a0853 Checking rights only once. Also taking care of mistakenly checking
ownership of events. xmlutils is now unaware of rights.
2012-08-15 22:36:42 +02:00
Guillaume Ayoub 98bbe61f67 Use relative imports 2012-08-09 17:31:36 +02:00
Guillaume Ayoub 17857654b0 Use the same import mechanisms for auth, storage, rights 2012-08-09 15:39:01 +02:00
Guillaume Ayoub 45afac5353 Code cleaned and modules renamed
*Radicale is probably broken now*
2012-08-08 18:29:09 +02:00
Guillaume Ayoub a17ad1b6a3 Un-revert some lost commits 2012-08-08 16:37:18 +02:00
Matthias Jordan 55a13d4c39 Merge remote-tracking branch 'upstream/master'
Conflicts:
	radicale/__init__.py
	radicale/acl/courier.py
2012-08-04 11:27:51 +02:00
Guillaume Ayoub 7ae764fd4b Enhance readability according to PEP8 2012-08-03 14:08:11 +02:00
Matthias Jordan e40e68b528 Separation of authentication and authorization. Separation of read and write authorization.
Static test strategies for authentication. Barely tested. Use at your own risk!
2012-08-03 13:10:20 +02:00
Guillaume Ayoub ea94ec919e Use the right namespace for adressbook tags 2012-06-28 11:28:42 +02:00
Guillaume Ayoub e471d15f00 Merge branch 'master' of github.com:Kozea/Radicale 2012-06-14 16:36:20 +02:00
Guillaume Ayoub 25c3648d75 Add a dummy filter for item tags
Related to #53
2012-06-14 16:35:32 +02:00
Oskari Timperi 209b9e4307 Set the D:displayname for collections in PROPFIND response
Atleast Nokia N9 shows the displayname to user. If the
property is empty, a calendar with empty name is shown.
Which is annoying.
2012-05-24 12:48:48 +03:00
Guillaume Ayoub c3ce8fde38 In PROPFIND responses, add the not-yet-created collection type when it can be guessed
Maybe related to #795
2012-04-11 19:50:18 +02:00
Guillaume Ayoub 505fd6a644 List the aggregation of privileges instead of only "all" 2012-03-19 12:35:39 +01:00
Guillaume Ayoub 7bfc17a51d Use " instead of ' (you can laugh at me) 2012-03-01 10:40:15 +01:00
Guillaume Ayoub 128a20714b Use is_leaf and is_node instead of is_item and is_collection 2012-02-23 15:17:59 +01:00
Guillaume Ayoub 224d0d47e8 Fix the collection detection 2012-02-20 17:41:36 +01:00
Guillaume Ayoub 4893f94920 Clean the calendar-timezone proppatch setter 2012-01-25 20:23:37 +01:00
Guillaume Ayoub 9c4a85ef1f Merge branch 'carddav', and update copyright dates
Conflicts:
	radicale/__init__.py
	radicale/ical.py
	radicale/xmlutils.py
2012-01-23 16:21:30 +01:00
Guillaume Ayoub 022b2aa91f Clean and reorder calendar functions 2012-01-12 02:39:47 +01:00
Guillaume Ayoub bff01db29b Manage addressbook-multiget and address-data 2012-01-05 21:58:50 +01:00
Guillaume Ayoub f11e78a3f4 Answer addressbook-home-set, fix the collection children detection 2012-01-05 21:49:34 +01:00
Guillaume Ayoub 8a4be02075 Add a (not tested) CardDAV support 2011-12-31 13:31:22 +01:00
Guillaume Ayoub f2d491ea61 Remove double slashes in report href URLs (related to #618) 2011-12-07 12:38:45 +01:00
Guillaume Ayoub 1f2f39a87a DELETE requests can delete calendars (closes #514) 2011-11-29 17:41:08 +01:00
Guillaume Ayoub fe0f3020a4 Stop being stupid for report requests 2011-10-24 13:14:56 +02:00
Guillaume Ayoub 5ea41e5f4b Fix the Python 3 support of pretty_xml 2011-07-20 23:14:00 +02:00
Guillaume Ayoub 0a84905383 Add a .pylintrc file, clean code 2011-07-14 11:23:19 +02:00
Guillaume Ayoub 3356d3235f Add the XML declaration 2011-07-07 12:38:56 +02:00
Guillaume Ayoub e9ad9b1716 Fix the iCal support (now tested with iCal, Lightning, Evolution) 2011-07-01 17:49:01 +02:00
Guillaume Ayoub 3d7f07dc0c Fix the href URL in propfind 2011-06-30 18:05:24 +02:00
Guillaume Ayoub 1d67706b56 Clean the calendar paths 2011-06-16 10:39:36 +02:00
Guillaume Ayoub af10a2f1c4 Fix URLs in report requests 2011-06-16 07:54:55 +02:00
Guillaume Ayoub de0643e741 Fix propfind paths 2011-06-16 07:50:21 +02:00
Guillaume Ayoub b8bcf65785 Restore the Lightning + anonymous calendars support 2011-06-08 07:43:40 +02:00
Guillaume Ayoub 080e4984aa Don't use isinstance(root, ET.Element) as ET.Element is a function in Python 2.6 2011-06-05 12:47:45 +02:00
Guillaume Ayoub e9935ae1a6 Use % instead of format for consistency (and Python 2.6 support) 2011-06-05 12:34:50 +02:00
Guillaume Ayoub fadd5dd675 Minor documentation and typo fixes caused by my insane love for PEP-3101 and pylint 2011-06-02 20:15:07 +02:00
Lukasz Langa f7868afed1 iCal bootstrapping using a default URL works 2011-06-01 22:33:18 +02:00
Lukasz Langa 1e6a4e7fb4 timezone is a part of the VCALENDAR file 2011-06-01 17:46:46 +02:00
Lukasz Langa 31edc1b03d explicit component content-types for iCal 2011-06-01 16:22:36 +02:00
Lukasz Langa 5b9180c295 The owner field should be an URL. Fixes delays in iCal. 2011-06-01 15:30:47 +02:00
Lukasz Langa e05e94a129 preliminary iCal/iPhone support introduced 2011-06-01 12:43:49 +02:00
Lukasz Langa 911cd48efe proppatch actually writes properties. 2011-05-24 17:33:57 +02:00
Lukasz Langa 85e283830a MKCALENDAR now actually creates the calendar. 2011-05-24 16:12:35 +02:00
Lukasz Langa b230601ee2 elementtree in Python 2.x would rather receive encoded strings. 2011-05-24 15:09:37 +02:00
Guillaume Ayoub 7c0e9686a8 Minor typo fix 2011-05-15 19:53:40 +02:00
Guillaume Ayoub e7ba2ab78b Register XML namespaces cleanly with Python 2.7+ and 3.2+
The old code was relying on a largely used but private variable.
Moreover, it was bugged with the empty string for "D", adding ":"
instead of nothing at the beginning of tag names with Python 2.6,
3.0 and 3.1, breaking at least the Lightning support.

This new code still relies on the private variable for old
Python versions, but uses the good-way™ for actual and future
versions. No default namespace is used for old versions, but
that's not that bad.
2011-05-13 22:03:50 +02:00
Guillaume Ayoub 4f3b574e35 Minor typo fixes 2011-05-13 10:13:56 +02:00
Lukasz Langa ae0851be35 treat the DAV namespace as default (XML output is nicer) 2011-05-11 16:24:55 +02:00
Lukasz Langa 663fda4ecb add the Apple iCal namespace to registry 2011-05-11 16:24:20 +02:00
Lukasz Langa afcfb11fde Revert "Remove useless calls to _tag"
This reverts commit 3b17ed2969.
2011-05-11 15:05:23 +02:00
Guillaume Ayoub 8f2335093d Always return pretty XML 2011-05-11 11:20:39 +02:00
Guillaume Ayoub 3b17ed2969 Remove useless calls to _tag 2011-05-11 08:39:32 +02:00
Guillaume Ayoub ac83dadc9c Typo fix 2011-05-11 08:13:33 +02:00
Guillaume Ayoub 6121bc882a Disable a useless pylint warning 2011-05-11 06:37:30 +02:00
Guillaume Ayoub aacfa8ff46 Various minor typo fixes 2011-05-11 06:19:05 +02:00
Lukasz Langa 485e375139 Minor py3k compatibility changes: iteritems() doesn't exist on Python 3.x, logged text must be Unicode. 2011-05-10 19:16:03 +02:00
Lukasz Langa 0d8fa5db6b More deprecation fixes
xmlutils.py:116: DeprecationWarning: This method will be removed in future
                 versions.  Use 'list(elem)' or iteration over elem instead.
prop_list = prop_element.getchildren()
2011-05-10 14:21:13 +02:00
Lukasz Langa 4230ec2fa9 Use pretty namespace prefixes in output. 2011-05-09 17:02:31 +02:00
Lukasz Langa 32b01d60fc in debug mode, prettify XML output for analysis 2011-05-09 16:51:58 +02:00
Lukasz Langa 4212f6dfe0 the replaced syntax is deprecated 2011-05-09 14:04:17 +02:00
Guillaume Ayoub a2f1e173d6 Clean code and add comments using pylint 2011-05-01 20:36:39 +02:00
Rémi Hainaud 474113454b Add support for iCal (closes #252) 2011-04-28 18:36:33 +02:00
Guillaume Ayoub c1da6872dd Add support for PROPPATCH requests 2011-04-28 18:04:34 +02:00
Guillaume Ayoub 39f7c7a96f Fix support of owner-less calendars 2011-04-25 20:12:37 +02:00
Guillaume Ayoub d061c09344 Add support for VJOURNAL items (closes #435) 2011-04-25 19:38:03 +02:00
Guillaume Ayoub af285e5db9 Revert changes in xmlutils 2011-04-25 13:33:48 +02:00
Guillaume Ayoub 43a1886546 Merge commit 'refs/merge-requests/8' of gitorious.org:radicale/radicale into merge-requests/8 2011-04-25 13:29:51 +02:00
Guillaume Ayoub 17f5c85f2d Add support for supported-report-set in propfind requests (related to #252) 2011-04-15 21:33:53 +02:00
Corentin Le Bail 938aa85aed Coninuing the merge 2011-04-10 19:19:59 +02:00
Corentin Le Bail c34d5cd7cd Merge branch 'master' of git://gitorious.org/radicale/radicale 2011-04-10 19:17:51 +02:00
René 'Necoro' Neumann 72c57a042d Allow missing owner 2011-03-25 01:30:34 +01:00
System User bb7f36fc59 Merge branch 'master' of git://gitorious.org/~clebail/radicale/ares-radicale
Conflicts:
	radicale/xmlutils.py
2011-02-17 10:42:02 +01:00
Corentin Le Bail 50919133ac Logging 2011-02-16 13:53:27 +01:00
System User 1f1d051656 Merge remote branch 'radicale/master' 2011-02-14 10:07:05 +01:00
Guillaume Ayoub 2e1b51e3c1 Softly ignore /user/ PROPFIND and REPORT requests (references #181) 2011-02-12 12:05:02 +01:00
Guillaume Ayoub 9874129bbb Add simple support for calendar-user-address-set (references #181) 2011-01-27 00:04:30 +01:00
Guillaume Ayoub 04938243a8 Update copyright year 2011-01-09 17:46:22 +01:00
Guillaume Ayoub d11d4cc8c1 Pylint, remove fixed todos 2011-01-09 17:41:42 +01:00
Guillaume Ayoub 039e868e5f iPhone support, thank you Andrew 2011-01-07 15:25:05 +01:00
System User 9d012fb76f Merge branch 'master' of git://gitorious.org/radicale/radicale 2011-01-03 15:29:53 +01:00
Guillaume Ayoub dcabf4249e Adding the calendar-home-set property management 2010-12-29 19:10:56 +01:00
Guillaume Ayoub c39ac102e8 Remove a done/rejected TODO 2010-12-29 16:47:07 +01:00
System User 3a9226ca80 Merge branch 'master' of git://gitorious.org/radicale/radicale
Conflicts:

	radicale/xmlutils.py
2010-12-23 10:10:40 +01:00
System User 55d67e629d Logging 2010-12-23 10:06:37 +01:00
Guillaume Ayoub 091d89889d Fix get requests for whole calendar 2010-12-20 15:49:48 +01:00
Guillaume Ayoub 72f3af9ab9 Fix bug caused by commit:673da6a9 2010-12-17 17:19:39 +01:00
Guillaume Ayoub 673da6a90a Merge Nicolas Évrard changes - Content-type added on multi-status responses and depth handled in propfind 2010-11-30 11:57:37 +01:00
Guillaume Ayoub 076b6b60a4 Fix the PROPFIND request management (list events and todos) 2010-09-28 16:32:47 +02:00
Guillaume Ayoub 9b153d56cc Add support for supported-report-set PROPFIND tag 2010-09-14 05:06:46 +02:00
Guillaume Ayoub 71819cdb39 Support displayname and principal-URL tags in PROPFIND requests 2010-09-12 13:13:21 +02:00
Guillaume Ayoub 57eef3c5ab Ignore CTag and remove useless workaround for empty calendars. 2010-04-13 00:31:00 +02:00
Guillaume Ayoub f479b4ba67 Check ETag before modifying or adding items. 2010-04-12 14:43:40 +02:00
Guillaume Ayoub a45ca25df9 Set hreferences for calendar items, fixing the PUT and DELETE requests. 2010-04-11 22:46:57 +02:00
Guillaume Ayoub 9a9342a1bd Remove the useless ElementTree protected namespaces hack. 2010-04-10 16:26:22 +02:00
Guillaume Ayoub e1a161edc9 Rename calendar into ical to avoid name collisions. 2010-02-11 01:41:24 +01:00
Guillaume Ayoub 9a07ec71d3 Merge ical/support/calendar modules. 2010-02-10 23:52:50 +01:00