[CalendarServer-changes] [13129] CalendarServer/branches/users/sagen/move2who-4/twistedcaldav/ directory
source_changes at macosforge.org
source_changes at macosforge.org
Wed Apr 2 13:48:29 PDT 2014
Revision: 13129
http://trac.calendarserver.org//changeset/13129
Author: sagen at apple.com
Date: 2014-04-02 13:48:29 -0700 (Wed, 02 Apr 2014)
Log Message:
-----------
pass in the right recordType to the children
Modified Paths:
--------------
CalendarServer/branches/users/sagen/move2who-4/twistedcaldav/directory/addressbook.py
CalendarServer/branches/users/sagen/move2who-4/twistedcaldav/directory/calendar.py
CalendarServer/branches/users/sagen/move2who-4/twistedcaldav/directory/principal.py
Modified: CalendarServer/branches/users/sagen/move2who-4/twistedcaldav/directory/addressbook.py
===================================================================
--- CalendarServer/branches/users/sagen/move2who-4/twistedcaldav/directory/addressbook.py 2014-04-02 20:30:54 UTC (rev 13128)
+++ CalendarServer/branches/users/sagen/move2who-4/twistedcaldav/directory/addressbook.py 2014-04-02 20:48:29 UTC (rev 13129)
@@ -114,16 +114,14 @@
self.directory.recordType.resource,
)
- for recordTypeName in [
- self.directory.recordTypeToOldName(r) for r in
+ for recordType, recordTypeName in [
+ (r, self.directory.recordTypeToOldName(r)) for r in
self.supportedChildTypes
]:
- # FIXME: why don't we also pass in the name to the resource itself
- # like we do for DirectoryCalendarHomeTypeProvisioningResource?
self.putChild(
recordTypeName,
DirectoryAddressBookHomeTypeProvisioningResource(
- self, recordTypeName, r
+ self, recordTypeName, recordType
)
)
Modified: CalendarServer/branches/users/sagen/move2who-4/twistedcaldav/directory/calendar.py
===================================================================
--- CalendarServer/branches/users/sagen/move2who-4/twistedcaldav/directory/calendar.py 2014-04-02 20:30:54 UTC (rev 13128)
+++ CalendarServer/branches/users/sagen/move2who-4/twistedcaldav/directory/calendar.py 2014-04-02 20:48:29 UTC (rev 13129)
@@ -114,14 +114,14 @@
self.directory.recordType.resource,
)
- for recordTypeName in [
- self.directory.recordTypeToOldName(r) for r in
+ for recordType, recordTypeName in [
+ (r, self.directory.recordTypeToOldName(r)) for r in
self.supportedChildTypes
]:
self.putChild(
recordTypeName,
DirectoryCalendarHomeTypeProvisioningResource(
- self, recordTypeName, r
+ self, recordTypeName, recordType
)
)
Modified: CalendarServer/branches/users/sagen/move2who-4/twistedcaldav/directory/principal.py
===================================================================
--- CalendarServer/branches/users/sagen/move2who-4/twistedcaldav/directory/principal.py 2014-04-02 20:30:54 UTC (rev 13128)
+++ CalendarServer/branches/users/sagen/move2who-4/twistedcaldav/directory/principal.py 2014-04-02 20:48:29 UTC (rev 13129)
@@ -286,9 +286,18 @@
#
# Create children
#
+
+ self.supportedChildTypes = (
+ self.directory.recordType.user,
+ self.directory.recordType.group,
+ self.directory.recordType.location,
+ self.directory.recordType.resource,
+ self.directory.recordType.address,
+ )
+
for name, recordType in [
(self.directory.recordTypeToOldName(r), r)
- for r in self.directory.recordTypes()
+ for r in self.supportedChildTypes
]:
self.putChild(
name,
@@ -404,8 +413,8 @@
def listChildren(self):
return [
- self.directory.recordTypeToOldName(r)
- for r in self.directory.recordTypes()
+ self.directory.recordTypeToOldName(r) for r in
+ self.supportedChildTypes
]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140402/36b4c43b/attachment.html>
More information about the calendarserver-changes
mailing list