[CalendarServer-changes] [4797] CalendarServer/trunk/calendarserver/provision/root.py
source_changes at macosforge.org
source_changes at macosforge.org
Fri Nov 20 16:01:20 PST 2009
Revision: 4797
http://trac.macosforge.org/projects/calendarserver/changeset/4797
Author: sagen at apple.com
Date: 2009-11-20 16:01:19 -0800 (Fri, 20 Nov 2009)
Log Message:
-----------
Access to wiki-related resources (/principals/wikis/* /calendars/wikis/* and /*/__uids__/wiki-*) are controlled by the wiki and should not be subject to calendar SACLs
Modified Paths:
--------------
CalendarServer/trunk/calendarserver/provision/root.py
Modified: CalendarServer/trunk/calendarserver/provision/root.py
===================================================================
--- CalendarServer/trunk/calendarserver/provision/root.py 2009-11-20 23:42:55 UTC (rev 4796)
+++ CalendarServer/trunk/calendarserver/provision/root.py 2009-11-21 00:01:19 UTC (rev 4797)
@@ -217,8 +217,8 @@
davxml.HRef.fromString("/principals/wikis/%s/" % (wikiName,))
)
- child = (yield super(RootResource, self).locateChild(request, segments))
- returnValue(child)
+ except HTTPError:
+ raise
# FIXME: should catch something more specific than Exception
except Exception, e:
@@ -230,10 +230,16 @@
# We don't want the /inbox resource to pay attention to SACLs because
- # we just want it to use the hard-coded ACL for the imip reply user
- if segments[0] == "inbox":
+ # we just want it to use the hard-coded ACL for the imip reply user.
+ # The /timezones resource is used by the wiki web calendar.
+ if segments[0] in ("inbox", "timezones"):
request.checkedSACL = True
+ elif (len(segments) > 2 and (segments[1] == "wikis" or
+ (segments[1] == "__uids__" and segments[2].startswith("wiki-")))):
+ # This is a wiki-related resource
+ request.checkedSACL = True
+
elif self.useSacls and not hasattr(request, "checkedSACL") and not hasattr(request, "checkingSACL"):
yield self.checkSacl(request)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20091120/3119d087/attachment.html>
More information about the calendarserver-changes
mailing list