[CalendarServer-changes] [13224] CalendarServer/trunk/txdav/who/util.py

source_changes at macosforge.org source_changes at macosforge.org
Wed Apr 9 10:34:40 PDT 2014


Revision: 13224
          http://trac.calendarserver.org//changeset/13224
Author:   gaya at apple.com
Date:     2014-04-09 10:34:40 -0700 (Wed, 09 Apr 2014)
Log Message:
-----------
restore r13214

Revision Links:
--------------
    http://trac.calendarserver.org//changeset/13214

Modified Paths:
--------------
    CalendarServer/trunk/txdav/who/util.py

Modified: CalendarServer/trunk/txdav/who/util.py
===================================================================
--- CalendarServer/trunk/txdav/who/util.py	2014-04-09 16:49:19 UTC (rev 13223)
+++ CalendarServer/trunk/txdav/who/util.py	2014-04-09 17:34:40 UTC (rev 13224)
@@ -25,7 +25,9 @@
     FieldName as BaseFieldName, RecordType, DirectoryConfigurationError
 )
 from twext.who.ldap import (
-    DirectoryService as LDAPDirectoryService, LDAPAttribute
+    DirectoryService as LDAPDirectoryService, LDAPAttribute,
+    FieldName as LDAPFieldName,
+    RecordTypeSchema, LDAPObjectClass
 )
 from twext.who.util import ConstantsContainer
 from twisted.cred.credentials import UsernamePassword
@@ -111,6 +113,33 @@
                     BaseFieldName.fullNames: (LDAPAttribute.cn.value,),
                     BaseFieldName.emailAddresses: (LDAPAttribute.mail.value,),
                     BaseFieldName.password: (LDAPAttribute.userPassword.value,),
+                    LDAPFieldName.memberDNs: (LDAPAttribute.uniqueMember.value,),
+                }),
+                recordTypeSchemas=MappingProxyType({
+                    RecordType.user: RecordTypeSchema(
+                        relativeDN=u"ou=People",
+
+                        # (objectClass=inetOrgPerson)
+                        attributes=(
+                            (
+                                LDAPAttribute.objectClass.value,
+                                LDAPObjectClass.inetOrgPerson.value,
+                            ),
+                        ),
+                    ),
+
+                    RecordType.group: RecordTypeSchema(
+                        relativeDN=u"ou=Groups",
+
+                        # (objectClass=groupOfNames)
+                        attributes=(
+                            (
+                                LDAPAttribute.objectClass.value,
+                                LDAPObjectClass.groupOfUniqueNames.value,
+                            ),
+                        ),
+                    ),
+
                 })
             )
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140409/5901869b/attachment.html>


More information about the calendarserver-changes mailing list