[CalendarServer-changes] [13214] CalendarServer/trunk/txdav/who/util.py
source_changes at macosforge.org
source_changes at macosforge.org
Tue Apr 8 21:05:11 PDT 2014
Revision: 13214
http://trac.calendarserver.org//changeset/13214
Author: sagen at apple.com
Date: 2014-04-08 21:05:11 -0700 (Tue, 08 Apr 2014)
Log Message:
-----------
Add custom recordTypeSchemas for LDAP; still need to make it configurable.
Modified Paths:
--------------
CalendarServer/trunk/txdav/who/util.py
Modified: CalendarServer/trunk/txdav/who/util.py
===================================================================
--- CalendarServer/trunk/txdav/who/util.py 2014-04-09 03:00:04 UTC (rev 13213)
+++ CalendarServer/trunk/txdav/who/util.py 2014-04-09 04:05:11 UTC (rev 13214)
@@ -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/20140408/b1d8f9e2/attachment.html>
More information about the calendarserver-changes
mailing list