[CalendarServer-changes] [7053] CalendarServer/trunk/twistedcaldav/directory

source_changes at macosforge.org source_changes at macosforge.org
Fri Feb 18 18:54:35 PST 2011


Revision: 7053
          http://trac.macosforge.org/projects/calendarserver/changeset/7053
Author:   cdaboo at apple.com
Date:     2011-02-18 18:54:31 -0800 (Fri, 18 Feb 2011)
Log Message:
-----------
Make sure groups are properly disabled for calendars and address books.

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/directory/directory.py
    CalendarServer/trunk/twistedcaldav/directory/test/augments.xml

Modified: CalendarServer/trunk/twistedcaldav/directory/directory.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/directory/directory.py	2011-02-18 22:44:44 UTC (rev 7052)
+++ CalendarServer/trunk/twistedcaldav/directory/directory.py	2011-02-19 02:54:31 UTC (rev 7053)
@@ -435,13 +435,14 @@
             self.enabledForAddressBooks = augment.enabledForAddressBooks
             self.autoSchedule = augment.autoSchedule
 
-            if self.enabledForCalendaring and self.recordType == self.service.recordType_groups:
+            if (self.enabledForCalendaring or self.enabledForAddressBooks) and self.recordType == self.service.recordType_groups:
                 self.enabledForCalendaring = False
+                self.enabledForAddressBooks = False
 
                 # For augment records cloned from the Default augment record,
                 # don't emit this message:
                 if not augment.clonedFromDefault:
-                    self.log_error("Group '%s(%s)' cannot be enabled for calendaring" % (self.guid, self.shortNames[0],))
+                    self.log_error("Group '%s(%s)' cannot be enabled for calendaring or address books" % (self.guid, self.shortNames[0],))
 
         else:
             # Groups are by default always enabled

Modified: CalendarServer/trunk/twistedcaldav/directory/test/augments.xml
===================================================================
--- CalendarServer/trunk/twistedcaldav/directory/test/augments.xml	2011-02-18 22:44:44 UTC (rev 7052)
+++ CalendarServer/trunk/twistedcaldav/directory/test/augments.xml	2011-02-19 02:54:31 UTC (rev 7053)
@@ -76,10 +76,14 @@
   <record>
     <uid>right_coast</uid>
     <enable>true</enable>
+    <enable-calendar>true</enable-calendar>
+    <enable-addressbook>true</enable-addressbook>
   </record>
   <record>
     <uid>left_coast</uid>
     <enable>true</enable>
+    <enable-calendar>true</enable-calendar>
+    <enable-addressbook>true</enable-addressbook>
   </record>
   <record>
     <uid>both_coasts</uid>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110218/d6fe0b42/attachment-0001.html>


More information about the calendarserver-changes mailing list