Code Repositories xandikos / dba1b13
Implement DAV:group-membership. Jelmer Vernooń≥ 3 years ago
4 changed file(s) with 25 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
9595 - DAV:alternate-uri-set [not supported]
9696 - DAV:principal-URL [supported]
9797 - DAV:group-member-set [not supported]
98 - DAV:group-membership [not supported]
98 - DAV:group-membership [supported]
9999 - DAV:owner [supported]
100100 - DAV:group [not supported]
101101 - DAV:current-user-privilege-set [supported]
6161 if owner_href is not None:
6262 el.append(webdav.create_href(owner_href, base_href=href))
6363
64
65 class GroupMembershipProperty(webdav.Property):
66 """Group membership.
67
68 See https://www.ietf.org/rfc/rfc3744.txt, section 4.4
69 """
70
71 name = '{DAV:}group-membership'
72 in_allprops = False
73 live = True
74 resource_type = webdav.PRINCIPAL_RESOURCE_TYPE
75
76 def get_value(self, base_href, resource, el):
77 for href in resource.get_group_membership():
78 el.append(webdav.create_href(href, base_href=href))
474474 raise KeyError
475475 with open(p, 'r') as f:
476476 return f.read()
477
478 def get_group_membership(self):
479 """Get group membership URLs."""
480 return []
477481
478482 @classmethod
479483 def create(cls, backend, relpath):
596600 webdav.AddMemberProperty(),
597601 caldav.MaxInstancesProperty(),
598602 caldav.MaxAttendeesPerInstanceProperty(),
603 access.GroupMembershipProperty(),
599604 ])
600605 self.register_reporters([
601606 caldav.CalendarMultiGetReporter(),
626626 def set_infit_settings(self, settings):
627627 """Set inf-it settings string."""
628628 raise NotImplementedError(self.get_infit_settings)
629
630 def get_group_membership(self):
631 """Get group membership URLs."""
632 raise NotImplementedError(self.get_group_membership)
629633
630634
631635 def get_property(href, resource, properties, name):