[CalendarServer-changes] [14115] CalendarServer/trunk

source_changes at macosforge.org source_changes at macosforge.org
Tue Oct 28 11:08:02 PDT 2014


Revision: 14115
          http://trac.calendarserver.org//changeset/14115
Author:   sagen at apple.com
Date:     2014-10-28 11:08:02 -0700 (Tue, 28 Oct 2014)
Log Message:
-----------
Support per recordType LDAP filters

Modified Paths:
--------------
    CalendarServer/trunk/requirements-stable.txt
    CalendarServer/trunk/twistedcaldav/stdconfig.py
    CalendarServer/trunk/txdav/who/util.py

Modified: CalendarServer/trunk/requirements-stable.txt
===================================================================
--- CalendarServer/trunk/requirements-stable.txt	2014-10-28 18:07:22 UTC (rev 14114)
+++ CalendarServer/trunk/requirements-stable.txt	2014-10-28 18:08:02 UTC (rev 14115)
@@ -5,7 +5,7 @@
 # For CalendarServer development, don't try to get these projects from PyPI; use svn.
 
 -e .
--e svn+http://svn.calendarserver.org/repository/calendarserver/twext/trunk@14112#egg=twextpy
+-e svn+http://svn.calendarserver.org/repository/calendarserver/twext/trunk@14114#egg=twextpy
 -e svn+http://svn.calendarserver.org/repository/calendarserver/PyKerberos/trunk@13420#egg=kerberos
 -e svn+http://svn.calendarserver.org/repository/calendarserver/PyCalendar/trunk@14025#egg=pycalendar
 

Modified: CalendarServer/trunk/twistedcaldav/stdconfig.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/stdconfig.py	2014-10-28 18:07:22 UTC (rev 14114)
+++ CalendarServer/trunk/twistedcaldav/stdconfig.py	2014-10-28 18:08:02 UTC (rev 14115)
@@ -82,7 +82,13 @@
             "readWriteProxy": ["icsContact", ],
             "readOnlyProxy": ["icsSecondaryOwners", ],
         },
-        "extra": None,
+        "extraFilters": {
+            "users": "",
+            "groups": "",
+            "locations": "",
+            "resources": "",
+            "addresses": "",
+        },
     },
 }
 

Modified: CalendarServer/trunk/txdav/who/util.py
===================================================================
--- CalendarServer/trunk/txdav/who/util.py	2014-10-28 18:07:22 UTC (rev 14114)
+++ CalendarServer/trunk/txdav/who/util.py	2014-10-28 18:08:02 UTC (rev 14115)
@@ -132,6 +132,7 @@
             else:
                 creds = None
             mapping = params.mapping
+            extraFilters = params.extraFilters
             directory = LDAPDirectoryService(
                 params.uri,
                 params.rdnSchema.base,
@@ -170,7 +171,13 @@
                         attributes=(),
                     ),
                 }),
-                extraFilter=params.extra
+                extraFilters={
+                    RecordType.user: extraFilters.get("users", ""),
+                    RecordType.group: extraFilters.get("groups", ""),
+                    CalRecordType.location: extraFilters.get("locations", ""),
+                    CalRecordType.resource: extraFilters.get("resources", ""),
+                    CalRecordType.address: extraFilters.get("addresses", ""),
+                }
             )
 
         elif "inmemory" in directoryType:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20141028/11a352ea/attachment.html>


More information about the calendarserver-changes mailing list