[CalendarServer-changes] [13492] CalendarServer/trunk

source_changes at macosforge.org source_changes at macosforge.org
Fri May 16 12:53:32 PDT 2014


Revision: 13492
          http://trac.calendarserver.org//changeset/13492
Author:   sagen at apple.com
Date:     2014-05-16 12:53:32 -0700 (Fri, 16 May 2014)
Log Message:
-----------
Tell twext.who.opendirectory to suppress system records when the calendar server does lookups; the agent needs to lookup a system account, so the agent does not pass the suppression flag.

Modified Paths:
--------------
    CalendarServer/trunk/calendarserver/tools/agent.py
    CalendarServer/trunk/requirements-stable.txt
    CalendarServer/trunk/txdav/who/util.py

Modified: CalendarServer/trunk/calendarserver/tools/agent.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/agent.py	2014-05-16 19:51:07 UTC (rev 13491)
+++ CalendarServer/trunk/calendarserver/tools/agent.py	2014-05-16 19:53:32 UTC (rev 13492)
@@ -177,7 +177,11 @@
         )
     )
 
-    directory = OpenDirectoryDirectoryService("/Local/Default")
+    # We need this service to be able to return com.apple.calendarserver,
+    # so tell it not to suppress system accounts.
+    directory = OpenDirectoryDirectoryService(
+        "/Local/Default", suppressSystemRecords=False
+    )
 
     portal = Portal(
         AgentRealm(root, [u"com.apple.calendarserver"]),

Modified: CalendarServer/trunk/requirements-stable.txt
===================================================================
--- CalendarServer/trunk/requirements-stable.txt	2014-05-16 19:51:07 UTC (rev 13491)
+++ CalendarServer/trunk/requirements-stable.txt	2014-05-16 19:53:32 UTC (rev 13492)
@@ -1,7 +1,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@13486#egg=twextpy
+-e svn+http://svn.calendarserver.org/repository/calendarserver/twext/trunk@13491#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@13420#egg=pycalendar
 

Modified: CalendarServer/trunk/txdav/who/util.py
===================================================================
--- CalendarServer/trunk/txdav/who/util.py	2014-05-16 19:51:07 UTC (rev 13491)
+++ CalendarServer/trunk/txdav/who/util.py	2014-05-16 19:53:32 UTC (rev 13492)
@@ -118,7 +118,9 @@
             from twext.who.opendirectory import (
                 DirectoryService as ODDirectoryService
             )
-            directory = ODDirectoryService()
+            # We don't want system accounts returned in lookups, so tell
+            # the service to suppress them.
+            directory = ODDirectoryService(suppressSystemRecords=True)
 
         elif "ldap" in directoryType:
             if params.credentials.dn and params.credentials.password:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140516/a8a56540/attachment-0001.html>


More information about the calendarserver-changes mailing list