[CalendarServer-changes] [412]
CalendarServer/branches/users/wsanchez/provisioning/twistedcaldav/
directory
source_changes at macosforge.org
source_changes at macosforge.org
Thu Nov 9 15:26:33 PST 2006
Revision: 412
http://trac.macosforge.org/projects/calendarserver/changeset/412
Author: wsanchez at apple.com
Date: 2006-11-09 15:26:33 -0800 (Thu, 09 Nov 2006)
Log Message:
-----------
Add .members() and .groups() to IDirectoryRecord.
Modified Paths:
--------------
CalendarServer/branches/users/wsanchez/provisioning/twistedcaldav/directory/appleopendirectory.py
CalendarServer/branches/users/wsanchez/provisioning/twistedcaldav/directory/directory.py
CalendarServer/branches/users/wsanchez/provisioning/twistedcaldav/directory/idirectory.py
Modified: CalendarServer/branches/users/wsanchez/provisioning/twistedcaldav/directory/appleopendirectory.py
===================================================================
--- CalendarServer/branches/users/wsanchez/provisioning/twistedcaldav/directory/appleopendirectory.py 2006-11-09 23:25:06 UTC (rev 411)
+++ CalendarServer/branches/users/wsanchez/provisioning/twistedcaldav/directory/appleopendirectory.py 2006-11-09 23:26:33 UTC (rev 412)
@@ -97,6 +97,15 @@
"""
Open Directory implementation of L{IDirectoryRecord}.
"""
+ def members(self):
+ if self.recordType != "group":
+ return ()
+
+ raise NotImplementedError("OpenDirectoryRecord.members() for groups")
+
+ def groups(self):
+ raise NotImplementedError("OpenDirectoryRecord.groups()")
+
def verifyCredentials(self, credentials):
if isinstance(credentials, UsernamePassword):
return opendirectory.authenticateUser(self.service.directory, self.shortName, credentials.password)
Modified: CalendarServer/branches/users/wsanchez/provisioning/twistedcaldav/directory/directory.py
===================================================================
--- CalendarServer/branches/users/wsanchez/provisioning/twistedcaldav/directory/directory.py 2006-11-09 23:25:06 UTC (rev 411)
+++ CalendarServer/branches/users/wsanchez/provisioning/twistedcaldav/directory/directory.py 2006-11-09 23:26:33 UTC (rev 412)
@@ -48,6 +48,12 @@
self.shortName = shortName
self.fullName = fullName
+ def members(self):
+ return ()
+
+ def groups(self):
+ return ()
+
def verifyCredentials(credentials):
return False
Modified: CalendarServer/branches/users/wsanchez/provisioning/twistedcaldav/directory/idirectory.py
===================================================================
--- CalendarServer/branches/users/wsanchez/provisioning/twistedcaldav/directory/idirectory.py 2006-11-09 23:25:06 UTC (rev 411)
+++ CalendarServer/branches/users/wsanchez/provisioning/twistedcaldav/directory/idirectory.py 2006-11-09 23:26:33 UTC (rev 412)
@@ -61,6 +61,18 @@
shortName = Attribute("The name of this record.")
fullName = Attribute("The full name of this record.")
+ def members(self):
+ """
+ @return: an iterable of L{IDirectoryRecord}s for the members of this
+ (group) record.
+ """
+
+ def group(self):
+ """
+ @return: an iterable of L{IDirectoryRecord}s for the groups this
+ record is a member of.
+ """
+
def authenticate(credentials):
"""
Verify that the given credentials can authenticate the principal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20061109/4560e66d/attachment.html
More information about the calendarserver-changes
mailing list