[Zope-Checkins] SVN: Zope/trunk/src/Products/Five/browser/ - use the same base class for __call__ and other attributes
Yvo Schubbe
cvs-admin at zope.org
Tue Jul 10 13:05:12 UTC 2012
Log message for revision 127298:
- use the same base class for __call__ and other attributes
Changed:
U Zope/trunk/src/Products/Five/browser/metaconfigure.py
U Zope/trunk/src/Products/Five/browser/tests/pages_ftest.txt
-=-
Modified: Zope/trunk/src/Products/Five/browser/metaconfigure.py
===================================================================
--- Zope/trunk/src/Products/Five/browser/metaconfigure.py 2012-07-10 12:50:33 UTC (rev 127297)
+++ Zope/trunk/src/Products/Five/browser/metaconfigure.py 2012-07-10 13:05:08 UTC (rev 127298)
@@ -129,7 +129,7 @@
# we're supposed to make a page for an attribute (read:
# method) and it's not __call__. We thus need to create a
# new class using our mixin for attributes.
- cdict.update({'__page_attribute__': attribute})
+ cdict['__page_attribute__'] = attribute
new_class = makeClass(class_.__name__, (class_, simple), cdict)
# in case the attribute does not provide a docstring,
@@ -149,8 +149,8 @@
# some security declarations on it so we really shouldn't
# modify the original. So, instead we make a new class
# with just one base class -- the original
- new_class = makeClass(class_.__name__,
- (class_, BrowserView), cdict)
+ cdict['__page_attribute__'] = attribute
+ new_class = makeClass(class_.__name__, (class_, simple), cdict)
else:
# template
Modified: Zope/trunk/src/Products/Five/browser/tests/pages_ftest.txt
===================================================================
--- Zope/trunk/src/Products/Five/browser/tests/pages_ftest.txt 2012-07-10 12:50:33 UTC (rev 127297)
+++ Zope/trunk/src/Products/Five/browser/tests/pages_ftest.txt 2012-07-10 13:05:08 UTC (rev 127298)
@@ -86,7 +86,7 @@
>>> response = self.publish('/test_folder_1_/testoid/eagle.method/mouse',
... basic='viewer:secret')
- >>> self.assertEqual(response.getStatus(), 401)
+ >>> self.assertEqual(response.getStatus(), 404)
The same should apply for the user if he has all other permissions
except 'View management screens':
More information about the Zope-Checkins
mailing list