[CalendarServer-changes] [12880] CalendarServer/trunk

source_changes at macosforge.org source_changes at macosforge.org
Wed Mar 12 11:28:29 PDT 2014


Revision: 12880
          http://trac.calendarserver.org//changeset/12880
Author:   cdaboo at apple.com
Date:     2014-03-12 11:28:29 -0700 (Wed, 12 Mar 2014)
Log Message:
-----------
Make xml directory use the default recordForCalendarUserAddress implementation to catch any errors in that.

Modified Paths:
--------------
    CalendarServer/trunk/conf/auth/resources-test.xml
    CalendarServer/trunk/twistedcaldav/directory/xmlfile.py

Modified: CalendarServer/trunk/conf/auth/resources-test.xml
===================================================================
--- CalendarServer/trunk/conf/auth/resources-test.xml	2014-03-12 18:24:06 UTC (rev 12879)
+++ CalendarServer/trunk/conf/auth/resources-test.xml	2014-03-12 18:28:29 UTC (rev 12880)
@@ -1,4 +1,16 @@
 <accounts realm="Test Realm">
+  <location repeat="10">
+    <uid>location%02d</uid>
+    <guid>location%02d</guid>
+    <password>location%02d</password>
+    <name>Room %02d</name>
+  </location>
+  <resource repeat="20">
+    <uid>resource%02d</uid>
+    <guid>resource%02d</guid>
+    <password>resource%02d</password>
+    <name>Resource %02d</name>
+  </resource>
   <location>
     <uid>fantastic</uid>
     <guid>4D66A20A-1437-437D-8069-2F14E8322234</guid>
@@ -28,51 +40,6 @@
     <name>Mercury Conference Room, Building 1, 2nd Floor</name>
   </location>
   <location>
-    <uid>location09</uid>
-    <guid>location09</guid>
-    <name>Room 09</name>
-  </location>
-  <location>
-    <uid>location08</uid>
-    <guid>location08</guid>
-    <name>Room 08</name>
-  </location>
-  <location>
-    <uid>location07</uid>
-    <guid>location07</guid>
-    <name>Room 07</name>
-  </location>
-  <location>
-    <uid>location06</uid>
-    <guid>location06</guid>
-    <name>Room 06</name>
-  </location>
-  <location>
-    <uid>location05</uid>
-    <guid>location05</guid>
-    <name>Room 05</name>
-  </location>
-  <location>
-    <uid>location04</uid>
-    <guid>location04</guid>
-    <name>Room 04</name>
-  </location>
-  <location>
-    <uid>location03</uid>
-    <guid>location03</guid>
-    <name>Room 03</name>
-  </location>
-  <location>
-    <uid>location02</uid>
-    <guid>location02</guid>
-    <name>Room 02</name>
-  </location>
-  <location>
-    <uid>location01</uid>
-    <guid>location01</guid>
-    <name>Room 01</name>
-  </location>
-  <location>
     <uid>delegatedroom</uid>
     <guid>delegatedroom</guid>
     <name>Delegated Conference Room</name>
@@ -101,11 +68,6 @@
     <name>Saturn Conference Room, Building 2, 1st Floor</name>
   </location>
   <location>
-    <uid>location10</uid>
-    <guid>location10</guid>
-    <name>Room 10</name>
-  </location>
-  <location>
     <uid>pretend</uid>
     <guid>06E3BDCB-9C19-485A-B14E-F146A80ADDC6</guid>
     <name>Pretend Conference Room</name>
@@ -134,115 +96,15 @@
     <name>Shari's Other Resource</name>
   </resource>
   <resource>
-    <uid>resource15</uid>
-    <guid>resource15</guid>
-    <name>Resource 15</name>
-  </resource>
-  <resource>
-    <uid>resource14</uid>
-    <guid>resource14</guid>
-    <name>Resource 14</name>
-  </resource>
-  <resource>
-    <uid>resource17</uid>
-    <guid>resource17</guid>
-    <name>Resource 17</name>
-  </resource>
-  <resource>
-    <uid>resource16</uid>
-    <guid>resource16</guid>
-    <name>Resource 16</name>
-  </resource>
-  <resource>
-    <uid>resource11</uid>
-    <guid>resource11</guid>
-    <name>Resource 11</name>
-  </resource>
-  <resource>
-    <uid>resource10</uid>
-    <guid>resource10</guid>
-    <name>Resource 10</name>
-  </resource>
-  <resource>
-    <uid>resource13</uid>
-    <guid>resource13</guid>
-    <name>Resource 13</name>
-  </resource>
-  <resource>
-    <uid>resource12</uid>
-    <guid>resource12</guid>
-    <name>Resource 12</name>
-  </resource>
-  <resource>
-    <uid>resource19</uid>
-    <guid>resource19</guid>
-    <name>Resource 19</name>
-  </resource>
-  <resource>
-    <uid>resource18</uid>
-    <guid>resource18</guid>
-    <name>Resource 18</name>
-  </resource>
-  <resource>
     <uid>sharisresource</uid>
     <guid>C38BEE7A-36EE-478C-9DCB-CBF4612AFE65</guid>
     <name>Shari's Resource</name>
   </resource>
   <resource>
-    <uid>resource20</uid>
-    <guid>resource20</guid>
-    <name>Resource 20</name>
-  </resource>
-  <resource>
-    <uid>resource06</uid>
-    <guid>resource06</guid>
-    <name>Resource 06</name>
-  </resource>
-  <resource>
-    <uid>resource07</uid>
-    <guid>resource07</guid>
-    <name>Resource 07</name>
-  </resource>
-  <resource>
-    <uid>resource04</uid>
-    <guid>resource04</guid>
-    <name>Resource 04</name>
-  </resource>
-  <resource>
-    <uid>resource05</uid>
-    <guid>resource05</guid>
-    <name>Resource 05</name>
-  </resource>
-  <resource>
-    <uid>resource02</uid>
-    <guid>resource02</guid>
-    <name>Resource 02</name>
-  </resource>
-  <resource>
-    <uid>resource03</uid>
-    <guid>resource03</guid>
-    <name>Resource 03</name>
-  </resource>
-  <resource>
-    <uid>resource01</uid>
-    <guid>resource01</guid>
-    <name>Resource 01</name>
-  </resource>
-  <resource>
     <uid>sharisotherresource1</uid>
     <guid>0CE0BF31-5F9E-4801-A489-8C70CF287F5F</guid>
     <name>Shari's Other Resource1</name>
   </resource>
-  <resource>
-    <uid>resource08</uid>
-    <guid>resource08</guid>
-    <name>Resource 08</name>
-  </resource>
-  <resource>
-    <uid>resource09</uid>
-    <guid>resource09</guid>
-    <name>Resource 09</name>
-  </resource>
   <address>
     <uid>testaddress1</uid>
     <guid>6F9EE33B-78F6-481B-9289-3D0812FF0D64</guid>

Modified: CalendarServer/trunk/twistedcaldav/directory/xmlfile.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/directory/xmlfile.py	2014-03-12 18:24:06 UTC (rev 12879)
+++ CalendarServer/trunk/twistedcaldav/directory/xmlfile.py	2014-03-12 18:28:29 UTC (rev 12880)
@@ -248,15 +248,6 @@
         return self._accounts()
 
 
-    def recordWithCalendarUserAddress(self, cua):
-        cua = normalizeCUAddr(cua)
-        for recordType in self.recordTypes():
-            record = self._lookupInIndex(recordType, self.INDEX_TYPE_CUA, cua)
-            if record and record.enabledForCalendaring:
-                return record
-        return None
-
-
     def recordWithShortName(self, recordType, shortName):
         return self._lookupInIndex(recordType, self.INDEX_TYPE_SHORTNAME, shortName)
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140312/c90ca120/attachment-0001.html>


More information about the calendarserver-changes mailing list