[z3-checkins] r5263 - z3/Five/trunk
philikon at codespeak.net
philikon at codespeak.net
Wed Jun 23 19:22:01 MEST 2004
Author: philikon
Date: Wed Jun 23 19:21:59 2004
New Revision: 5263
Modified:
z3/Five/trunk/fiveconfigure.py
Log:
Get rid of unnecessary comment and some commented code that isn't
necessary. Security seems to work well now; we just need some functional
tests to back this up.
Added a comment why we provide __call__ for attribute views.
Modified: z3/Five/trunk/fiveconfigure.py
==============================================================================
--- z3/Five/trunk/fiveconfigure.py (original)
+++ z3/Five/trunk/fiveconfigure.py Wed Jun 23 19:21:59 2004
@@ -204,13 +204,12 @@
def __browser_default__(self, request):
return self, (self.__page_attribute__,)
+ # this is technically not needed because ZPublisher finds our
+ # attribute through __browser_default__; but we also want to be
+ # able to call pages from python modules, PythonScripts or ZPT
def __call__(self, *args, **kw):
attr = self.__page_attribute__
meth = getattr(self, attr)
- #XXX not sure if this is really necessary; we need tests for this
- #security_manager = getSecurityManager()
- #if not security_manager.validate(meth, self, attr, meth):
- # raise Unauthorized
return meth(*args, **kw)
class ViewMixinForTemplates(BrowserView):
@@ -221,9 +220,6 @@
# make the template publishable
def __call__(self, *args, **kw):
- # we technically would have to validate here, but it doesn't
- # seem to work because index is a ViewPageTemplateFile
- #XXX not sure if we really need to validate here anyway
return self.index(self, *args, **kw)
def makeClassForTemplate(src, template=None, used_for=None, bases=(), cdict=None):
More information about the z3-checkins
mailing list