Code Repositories xandikos / 7b1fad5
Support managed-attachments-server-URL Jelmer Vernooń≥ 1 year, 5 months ago
3 changed file(s) with 30 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
245245 - DAV:calendar-proxy-read-for [supported]
246246 - DAV:calendar-proxy-write-for [supported]
247247
248 - {https://calendarserver.org/ns/}refreshrate
249
250248 Apple-specific Properties
251249 ^^^^^^^^^^^^^^^^^^^^^^^^^
252250
253251 - calendar-color [supported]
254252 - getctag [supported]
253 - refreshrate [supported]
255254
256255 inf-it properties
257256 ^^^^^^^^^^^^^^^^^
263262 AgendaV properties
264263 ^^^^^^^^^^^^^^^^^^
265264
266 - CALDAV:max-attachments-per-resource
267 - CALDAV:max-attachment-size
265 https://tools.ietf.org/id/draft-ietf-calext-caldav-attachments-03.html
266
267 - CALDAV:max-attachments-per-resource [supported]
268 - CALDAV:max-attachment-size [supported]
269 - CALDAV:managed-attachments-server-URL [supported]
268270
269271 rfc5995.txt (POST to create members)
270272 ------------------------------------
137137 def get_max_attachment_size(self):
138138 """Return max attachment size."""
139139 raise NotImplementedError(self.get_max_attachment_size)
140
141 def get_managed_attachments_server_url(self):
142 """Return the attachments server URL."""
143 raise NotImplementedError(self.get_managed_attachments_server_url)
140144
141145 def get_schedule_calendar_transparency(self):
142146 """Get calendar transparency.
779783
780784 def get_value(self, href, resource, el, environ):
781785 el.text = str(resource.get_max_attachment_size())
786
787
788 class ManagedAttachmentsServerURLProperty(webdav.Property):
789 """managed-attachments-server-URL property.
790
791 https://tools.ietf.org/id/draft-ietf-calext-caldav-attachments-03.html#rfc.section.6.1
792 """
793
794 name = '{%s}managed-attachments-server-URL' % NAMESPACE
795 in_allprops = False
796
797 def get_value(self, base_href, resource, el, environ):
798 href = resource.get_managed_attachments_server_url()
799 if href is not None:
800 el.append(webdav.create_href(href, base_href))
782801
783802
784803 class CalendarProxyReadForProperty(webdav.Property):
439439 def get_schedule_calendar_transparency(self):
440440 # TODO(jelmer): Allow configuration in config
441441 return caldav.TRANSPARENCY_OPAQUE
442
443 def get_managed_attachments_server_url(self):
444 # TODO(jelmer)
445 raise KeyError
442446
443447
444448 class AddressbookCollection(StoreBasedCollection, carddav.Addressbook):
863867 caldav.CalendarProxyWriteForProperty(),
864868 caldav.MaxAttachmentSizeProperty(),
865869 caldav.MaxAttachmentsPerResourceProperty(),
870 caldav.ManagedAttachmentsServerURLProperty(),
866871 quota.QuotaAvailableBytesProperty(),
867872 quota.QuotaUsedBytesProperty(),
868873 webdav.RefreshRateProperty(),