[CalendarServer-changes] [14811] CalendarServer/branches/release/CalendarServer-5.4-dev/ twistedcaldav

source_changes at macosforge.org source_changes at macosforge.org
Thu May 21 10:31:51 PDT 2015


Revision: 14811
          http://trac.calendarserver.org//changeset/14811
Author:   sagen at apple.com
Date:     2015-05-21 10:31:51 -0700 (Thu, 21 May 2015)
Log Message:
-----------
Support for fetching auto-schedule-mode from LDAP

Modified Paths:
--------------
    CalendarServer/branches/release/CalendarServer-5.4-dev/twistedcaldav/directory/ldapdirectory.py
    CalendarServer/branches/release/CalendarServer-5.4-dev/twistedcaldav/stdconfig.py

Modified: CalendarServer/branches/release/CalendarServer-5.4-dev/twistedcaldav/directory/ldapdirectory.py
===================================================================
--- CalendarServer/branches/release/CalendarServer-5.4-dev/twistedcaldav/directory/ldapdirectory.py	2015-05-20 19:54:29 UTC (rev 14810)
+++ CalendarServer/branches/release/CalendarServer-5.4-dev/twistedcaldav/directory/ldapdirectory.py	2015-05-21 17:31:51 UTC (rev 14811)
@@ -183,6 +183,7 @@
                 # individually:
                 "autoScheduleAttr": None,
                 "autoScheduleEnabledValue": "yes",
+                "autoScheduleModeAttr": None, # must match augment.allowedAutoScheduleModes
                 "proxyAttr": None, # list of GUIDs
                 "readOnlyProxyAttr": None, # list of GUIDs
                 "autoAcceptGroupAttr": None, # single group GUID
@@ -267,6 +268,8 @@
             attrSet.add(self.resourceSchema["resourceInfoAttr"])
         if self.resourceSchema["autoScheduleAttr"]:
             attrSet.add(self.resourceSchema["autoScheduleAttr"])
+        if self.resourceSchema["autoScheduleModeAttr"]:
+            attrSet.add(self.resourceSchema["autoScheduleModeAttr"])
         if self.resourceSchema["autoAcceptGroupAttr"]:
             attrSet.add(self.resourceSchema["autoAcceptGroupAttr"])
         if self.resourceSchema["proxyAttr"]:
@@ -816,6 +819,7 @@
         proxyGUIDs = ()
         readOnlyProxyGUIDs = ()
         autoSchedule = False
+        autoScheduleMode = None
         autoAcceptGroup = ""
         memberGUIDs = []
 
@@ -886,6 +890,9 @@
                         self.resourceSchema["autoScheduleAttr"])
                     autoSchedule = (autoScheduleValue ==
                         self.resourceSchema["autoScheduleEnabledValue"])
+                if self.resourceSchema["autoScheduleModeAttr"]:
+                    autoScheduleMode = self._getUniqueLdapAttribute(attrs,
+                        self.resourceSchema["autoScheduleModeAttr"])
                 if self.resourceSchema["proxyAttr"]:
                     proxyGUIDs = set(self._getMultipleLdapAttributes(attrs,
                         self.resourceSchema["proxyAttr"]))
@@ -960,6 +967,7 @@
                 partitionID=partitionID,
                 enabledForCalendaring=enabledForCalendaring,
                 autoSchedule=autoSchedule,
+                autoScheduleMode=autoScheduleMode,
                 autoAcceptGroup=autoAcceptGroup,
                 enabledForAddressBooks=enabledForAddressBooks, # TODO: add to LDAP?
                 enabledForLogin=enabledForLogin,

Modified: CalendarServer/branches/release/CalendarServer-5.4-dev/twistedcaldav/stdconfig.py
===================================================================
--- CalendarServer/branches/release/CalendarServer-5.4-dev/twistedcaldav/stdconfig.py	2015-05-20 19:54:29 UTC (rev 14810)
+++ CalendarServer/branches/release/CalendarServer-5.4-dev/twistedcaldav/stdconfig.py	2015-05-21 17:31:51 UTC (rev 14811)
@@ -154,8 +154,17 @@
             "memberIdAttr": None, # which attribute the above refer to
         },
         "resourceSchema": {
-            "resourceInfoAttr": None, # contains location/resource info
-            "autoAcceptGroupAttr": None, # auto accept group
+            # Either set this attribute to retrieve the plist version
+            # of resource-info, as in a Leopard OD server, or...
+            "resourceInfoAttr": None,
+            # ...set the above to None and instead specify these
+            # individually:
+            "autoScheduleAttr": None,
+            "autoScheduleEnabledValue": "yes",
+            "autoScheduleModeAttr": None, # must match augment.allowedAutoScheduleModes
+            "proxyAttr": None, # list of GUIDs
+            "readOnlyProxyAttr": None, # list of GUIDs
+            "autoAcceptGroupAttr": None, # single group GUID
         },
         "partitionSchema": {
             "serverIdAttr": None, # maps to augments server-id
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150521/13927a4a/attachment-0001.html>


More information about the calendarserver-changes mailing list