caldav: enable GroupDAV discovery.

The webdav+ics folders are valid for GroupDAV, too, if only a resourcetype
element is added to their propfind responses.

bzr revid: p_christ@hol.gr-20100729133937-59kfge35mjfmxdvk
This commit is contained in:
P. Christeas 2010-07-29 16:39:37 +03:00
parent e78571ac67
commit c4f0e13364
1 changed files with 5 additions and 0 deletions

View File

@ -119,6 +119,7 @@ class node_calendar(nodes.node_class):
our_type = 'collection'
DAV_PROPS = {
"http://calendarserver.org/ns/" : ('getctag',),
'http://groupdav.org/': ('resourcetype',),
"urn:ietf:params:xml:ns:caldav" : (
'calendar-description',
'calendar-data',
@ -128,6 +129,7 @@ class node_calendar(nodes.node_class):
'schedule-outbox-URL',)}
DAV_M_NS = {
"DAV:" : '_get_dav',
'http://groupdav.org/': '_get_gdav',
"http://calendarserver.org/ns/" : '_get_dav',
"urn:ietf:params:xml:ns:caldav" : '_get_caldav'}
@ -147,6 +149,9 @@ class node_calendar(nodes.node_class):
result = self._get_ttag(cr) + ':' + str(time.time())
return str(result)
def _get_gdav_resourcetype(self, cr):
return (str(self.cal_type + '-collection'), 'http://groupdav.org/')
def removeme_match_dav_eprop(self, cr, match, ns, prop):
# Why?
if ns == "DAV:" and prop == "getetag":