[CalendarServer-changes] [8291] CalDAVTester/trunk/odsetup.py
source_changes at macosforge.org
source_changes at macosforge.org
Tue Nov 15 16:52:01 PST 2011
Revision: 8291
http://trac.macosforge.org/projects/calendarserver/changeset/8291
Author: dre at apple.com
Date: 2011-11-15 16:52:01 -0800 (Tue, 15 Nov 2011)
Log Message:
-----------
Fix bug introduced in r8218; patchConfig has to happen after principal records are created. Configuring AugmentService has to happen before records are created. 10399622
Revision Links:
--------------
http://trac.macosforge.org/projects/calendarserver/changeset/8218
Modified Paths:
--------------
CalDAVTester/trunk/odsetup.py
Modified: CalDAVTester/trunk/odsetup.py
===================================================================
--- CalDAVTester/trunk/odsetup.py 2011-11-15 18:32:13 UTC (rev 8290)
+++ CalDAVTester/trunk/odsetup.py 2011-11-16 00:52:01 UTC (rev 8291)
@@ -333,7 +333,6 @@
* SACLs are disabled
* CalDAV and CardDAV are enabled
* EnableAnonymousReadRoot is enabled
- * AugmentService is configured
@param config: file path to caldavd.plist
@type config: str
@@ -360,10 +359,20 @@
# Needed for CDT
plist["EnableAnonymousReadRoot"] = True
- plist["AugmentService"] = {'params': {'xmlFiles': ['augments.xml']}, 'type': 'twistedcaldav.directory.augment.AugmentXMLDB'}
writePlist(plist, config)
+def patchConfigForAugmentService(config):
+ """
+ Patch the caldavd.plist file to configure AugmentService
+
+ @param config: file path to caldavd.plist
+ @type config: str
+ """
+ plist = readPlist(config)
+ plist["AugmentService"] = {'params': {'xmlFiles': ['augments.xml']}, 'type': 'twistedcaldav.directory.augment.AugmentXMLDB'}
+ writePlist(plist, config)
+
def patchSudoers(sudoers):
"""
Patch the sudoers.plist file to add the superuser we need to test proxy authentication.
@@ -700,8 +709,8 @@
# Patch the sudoers file for the superuser principal.
patchSudoers(sudoers)
- # Patch the caldavd.plist file with the testadmin user's guid-based principal-URL
- patchConfig(config, "/principals/__uids__/%s/" % (guids["testadmin"],))
+ # Patch caldavd.plist to configure AugmentService, needed before creating resources
+ patchConfigForAugmentService(config)
# Now generate the OD accounts (caching guids as we go).
if protocol == "caldav":
@@ -711,6 +720,9 @@
doToAccounts(config, protocol, createUser)
doGroupMemberships()
+ # Patch the caldavd.plist file with the testadmin user's guid-based principal-URL
+ patchConfig(config, "/principals/__uids__/%s/" % (guids["testadmin"],))
+
# Create an appropriate serverinfo.xml file from the template
buildServerinfo(serverinfo_default, hostname, port, sslport, authtype, docroot)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20111115/ac84849a/attachment.html>
More information about the calendarserver-changes
mailing list