Commit e3dcff0d authored by Martin Aspeli's avatar Martin Aspeli

Apply some safety to the fix in r110185 after reports it may be causing some problems

parent 90cee462
...@@ -27,6 +27,7 @@ from zope.app.publisher.browser import fileresource, directoryresource ...@@ -27,6 +27,7 @@ from zope.app.publisher.browser import fileresource, directoryresource
from zope.app.publisher.fileresource import File, Image from zope.app.publisher.fileresource import File, Image
from zope.app.publisher.pagetemplateresource import PageTemplate from zope.app.publisher.pagetemplateresource import PageTemplate
from Acquisition import aq_base
from Products.Five.browser import BrowserView from Products.Five.browser import BrowserView
...@@ -164,6 +165,7 @@ class DirectoryResource(Resource, directoryresource.DirectoryResource): ...@@ -164,6 +165,7 @@ class DirectoryResource(Resource, directoryresource.DirectoryResource):
# We need to propagate security so that restrictedTraverse() will # We need to propagate security so that restrictedTraverse() will
# work # work
if hasattr(aq_base(self), '__roles__'):
resource.__roles__ = self.__roles__ resource.__roles__ = self.__roles__
return resource return resource
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment