[CalendarServer-changes] [7829] CalendarServer/trunk/twistedcaldav/directory/ldapdirectory.py
source_changes at macosforge.org
source_changes at macosforge.org
Wed Jul 27 16:39:59 PDT 2011
Revision: 7829
http://trac.macosforge.org/projects/calendarserver/changeset/7829
Author: sagen at apple.com
Date: 2011-07-27 16:39:57 -0700 (Wed, 27 Jul 2011)
Log Message:
-----------
When looking at cached group memberships, use the attribute the LDAP directory uses to indicate membership, not necessarily record.guid.
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/directory/ldapdirectory.py
Modified: CalendarServer/trunk/twistedcaldav/directory/ldapdirectory.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/directory/ldapdirectory.py 2011-07-27 20:56:25 UTC (rev 7828)
+++ CalendarServer/trunk/twistedcaldav/directory/ldapdirectory.py 2011-07-27 23:39:57 UTC (rev 7829)
@@ -796,7 +796,6 @@
record = self._ldapResultToRecord(dn, attrs, recordType)
records.append(record)
- print dn, attrs, record
self.log_debug("Principal property search matched %d records" % (len(records),))
return succeed(records)
@@ -924,6 +923,7 @@
# TODO: what about duplicates?
dn, attrs = result.pop()
+ self.log_debug("Retrieved: %s %s" % (dn,attrs))
if recordType == self.service.recordType_users:
shortName = self.service._getUniqueLdapAttribute(attrs,
@@ -988,6 +988,12 @@
return groups
+ def cachedGroups(self):
+ """
+ Return the set of groups (guids) this record is a member of, based on
+ the data cached by cacheGroupMembership( )
+ """
+ return self.service.groupMembershipCache.getGroupsFor(self._memberId)
def memberGUIDs(self):
return set(self._memberGUIDs)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110727/d285bb1d/attachment.html>
More information about the calendarserver-changes
mailing list