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

source_changes at macosforge.org source_changes at macosforge.org
Wed Feb 24 11:05:08 PST 2010


Revision: 5192
          http://trac.macosforge.org/projects/calendarserver/changeset/5192
Author:   sagen at apple.com
Date:     2010-02-24 11:05:06 -0800 (Wed, 24 Feb 2010)
Log Message:
-----------
Wiki principals need to be enabled regardless of augment db -- ultimately it's up to the paired wiki-server.

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/directory/wiki.py

Added Paths:
-----------
    CalendarServer/trunk/twistedcaldav/directory/test/test_wiki.py

Added: CalendarServer/trunk/twistedcaldav/directory/test/test_wiki.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/directory/test/test_wiki.py	                        (rev 0)
+++ CalendarServer/trunk/twistedcaldav/directory/test/test_wiki.py	2010-02-24 19:05:06 UTC (rev 5192)
@@ -0,0 +1,34 @@
+##
+# Copyright (c) 2005-2010 Apple Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##
+
+from twistedcaldav.test.util import TestCase
+from twistedcaldav.directory.wiki import WikiDirectoryService, WikiDirectoryRecord
+
+class WikiTestCase(TestCase):
+    """
+    Test the Wiki Directory Service
+    """
+
+    def test_enabled(self):
+        service = WikiDirectoryService()
+        service.realmName = "Test"
+        record = WikiDirectoryRecord(service,
+            WikiDirectoryService.recordType_wikis,
+            "test",
+            None
+        )
+        self.assertTrue(record.enabled)
+        self.assertTrue(record.enabledForCalendaring)

Modified: CalendarServer/trunk/twistedcaldav/directory/wiki.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/directory/wiki.py	2010-02-23 23:48:55 UTC (rev 5191)
+++ CalendarServer/trunk/twistedcaldav/directory/wiki.py	2010-02-24 19:05:06 UTC (rev 5192)
@@ -123,6 +123,8 @@
             enabledForCalendaring=True,
             uid="%s%s" % (WikiDirectoryService.UIDPrefix, shortName),
         )
+        # Wiki enabling doesn't come from augments db, so enable here...
+        self.enabled = True
 
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100224/61bea490/attachment.html>


More information about the calendarserver-changes mailing list