[CalendarServer-changes] [5984] CalendarServer/branches/users/wsanchez/deployment/twistedcaldav/ directory
source_changes at macosforge.org
source_changes at macosforge.org
Thu Aug 5 12:30:09 PDT 2010
Revision: 5984
http://trac.macosforge.org/projects/calendarserver/changeset/5984
Author: cdaboo at apple.com
Date: 2010-08-05 12:30:08 -0700 (Thu, 05 Aug 2010)
Log Message:
-----------
Fix tests.
Modified Paths:
--------------
CalendarServer/branches/users/wsanchez/deployment/twistedcaldav/directory/calendaruserproxy.py
CalendarServer/branches/users/wsanchez/deployment/twistedcaldav/directory/test/test_opendirectory.py
Modified: CalendarServer/branches/users/wsanchez/deployment/twistedcaldav/directory/calendaruserproxy.py
===================================================================
--- CalendarServer/branches/users/wsanchez/deployment/twistedcaldav/directory/calendaruserproxy.py 2010-08-05 19:03:24 UTC (rev 5983)
+++ CalendarServer/branches/users/wsanchez/deployment/twistedcaldav/directory/calendaruserproxy.py 2010-08-05 19:30:08 UTC (rev 5984)
@@ -330,35 +330,35 @@
@inlineCallbacks
def _directGroupMembers(self):
- if self.hasEditableMembership():
- # Get member UIDs from database and map to principal resources
- members = yield self._index().getMembers(self.uid)
- found = []
- missing = []
- for uid in members:
- p = self.pcollection.principalForUID(uid)
- if p:
- found.append(p)
- # Make sure any outstanding deletion timer entries for
- # existing principals are removed
- yield self._index().refreshPrincipal(uid)
- else:
- missing.append(uid)
-
- # Clean-up ones that are missing
- for uid in missing:
- cacheTimeout = config.DirectoryService.params.get("cacheTimeout", 30) * 60 # in seconds
-
- yield self._index().removePrincipal(uid, delay=cacheTimeout*2)
-
- returnValue(found)
- else:
- # Fixed proxies
- if self.proxyType == "calendar-proxy-write":
- returnValue(self.parent.proxies())
+ # Get member UIDs from database and map to principal resources
+ members = yield self._index().getMembers(self.uid)
+ found = []
+ missing = []
+ for uid in members:
+ p = self.pcollection.principalForUID(uid)
+ if p:
+ found.append(p)
+ # Make sure any outstanding deletion timer entries for
+ # existing principals are removed
+ yield self._index().refreshPrincipal(uid)
else:
- returnValue(self.parent.readOnlyProxies())
+ missing.append(uid)
+ # Clean-up ones that are missing
+ for uid in missing:
+ cacheTimeout = config.DirectoryService.params.get("cacheTimeout", 30) * 60 # in seconds
+
+ yield self._index().removePrincipal(uid, delay=cacheTimeout*2)
+
+ # Fixed proxies
+ if self.proxyType == "calendar-proxy-write":
+ found.extend(self.parent.proxies())
+ else:
+ found.extend(self.parent.readOnlyProxies())
+
+ returnValue(found)
+
+
def groupMembers(self):
return self._expandMemberUIDs()
Modified: CalendarServer/branches/users/wsanchez/deployment/twistedcaldav/directory/test/test_opendirectory.py
===================================================================
--- CalendarServer/branches/users/wsanchez/deployment/twistedcaldav/directory/test/test_opendirectory.py 2010-08-05 19:03:24 UTC (rev 5983)
+++ CalendarServer/branches/users/wsanchez/deployment/twistedcaldav/directory/test/test_opendirectory.py 2010-08-05 19:30:08 UTC (rev 5984)
@@ -72,6 +72,8 @@
fullName = "Some user",
emailAddresses = set(("someuser at example.com",)),
memberGUIDs = [],
+ proxyGUIDs = [],
+ readOnlyProxyGUIDs = [],
)
digestFields = {}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100805/a212b0a5/attachment.html>
More information about the calendarserver-changes
mailing list