Log message for revision 114793: merge the rest of r114289 to Zope2 trunk
Changed: U Zope/trunk/doc/CHANGES.rst U Zope/trunk/src/Products/Five/browser/metaconfigure.py U Zope/trunk/src/Products/Five/browser/tests/pages.py U Zope/trunk/src/Products/Five/browser/tests/pages.txt U Zope/trunk/src/Products/Five/browser/tests/pages.zcml -=- Modified: Zope/trunk/doc/CHANGES.rst =================================================================== --- Zope/trunk/doc/CHANGES.rst 2010-07-16 06:16:32 UTC (rev 114792) +++ Zope/trunk/doc/CHANGES.rst 2010-07-16 06:17:23 UTC (rev 114793) @@ -11,6 +11,12 @@ Bugs Fixed ++++++++++ +- Fix support for non-public permission attributes in the + browser:view directive so that attributes which are not included in + allowed_interface or allowed_attributes but which have declarations from a + base class's security info don't get their security overwritten to be + private. + - LP #143755: Also catch TypeError when trying to determine an indexable value for an object in PluginIndexes.common.UnIndex Modified: Zope/trunk/src/Products/Five/browser/metaconfigure.py =================================================================== --- Zope/trunk/src/Products/Five/browser/metaconfigure.py 2010-07-16 06:16:32 UTC (rev 114792) +++ Zope/trunk/src/Products/Five/browser/metaconfigure.py 2010-07-16 06:17:23 UTC (rev 114793) @@ -314,7 +314,7 @@ _context.action( discriminator = ('five:protectName', newclass, attr), callable = protectName, - args = (newclass, attr, CheckerPrivateId) + args = (newclass, attr, CheckerPrivateId, False) ) # Protect the class Modified: Zope/trunk/src/Products/Five/browser/tests/pages.py =================================================================== --- Zope/trunk/src/Products/Five/browser/tests/pages.py 2010-07-16 06:16:32 UTC (rev 114792) +++ Zope/trunk/src/Products/Five/browser/tests/pages.py 2010-07-16 06:17:23 UTC (rev 114793) @@ -17,6 +17,7 @@ """ from Products.Five import BrowserView from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile +from OFS.SimpleItem import SimpleItem class SimpleView(BrowserView): """More docstring. Please Zope""" @@ -40,6 +41,11 @@ def __call__(self): return u"I was __call__()'ed" +class PermissionView(BrowserView, SimpleItem): + + def __call__(self): + return u"I was __call__()'ed" + class CallTemplate(BrowserView): __call__ = ViewPageTemplateFile('falcon.pt') Modified: Zope/trunk/src/Products/Five/browser/tests/pages.txt =================================================================== --- Zope/trunk/src/Products/Five/browser/tests/pages.txt 2010-07-16 06:16:32 UTC (rev 114792) +++ Zope/trunk/src/Products/Five/browser/tests/pages.txt 2010-07-16 06:17:23 UTC (rev 114793) @@ -275,7 +275,13 @@ >>> aq_parent(aq_inner(context)) <Folder at /test_folder_1_> +Make sure that methods which are not included in the allowed interface or +attributes, but which already had security declarations from a base class, +don't get those declarations overridden to be private. (The roles for +restrictedTraverse should be None, indicating it is public.) + >>> view.restrictedTraverse__roles__ + Other ----- Modified: Zope/trunk/src/Products/Five/browser/tests/pages.zcml =================================================================== --- Zope/trunk/src/Products/Five/browser/tests/pages.zcml 2010-07-16 06:16:32 UTC (rev 114792) +++ Zope/trunk/src/Products/Five/browser/tests/pages.zcml 2010-07-16 06:17:23 UTC (rev 114793) @@ -237,7 +237,7 @@ <browser:view name="permission_view" for="Products.Five.tests.testing.simplecontent.ISimpleContent" - class=".pages.CallView" + class=".pages.PermissionView" permission="zope2.ViewManagementScreens" /> _______________________________________________ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins