Skip to content

Commit

Permalink
fix #3323
Browse files Browse the repository at this point in the history
  • Loading branch information
jensens committed Nov 25, 2021
1 parent 9b13421 commit a3d920b
Showing 2 changed files with 20 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Products/CMFPlone/Portal.py
Original file line number Diff line number Diff line change
@@ -139,6 +139,24 @@ def __before_publishing_traverse__(self, arg1, arg2=None):

super(PloneSite, self).__before_publishing_traverse__(arg1, arg2)

# Partly from OFS.OrderSupport
@security.protected(permissions.AccessContentsInformation)
def tpValues(self):
# Return a list of subobjects, used by ZMI tree tag (and only there).
# see also https://github.com/plone/Products.CMFPlone/issues/3323
result = []
obj_ids = self.objectIds()
obj_ids.sort()
getOb = self._getOb
for id in obj_ids:
obj = getOb(id)
if (
hasattr(aq_base(obj), 'isPrincipiaFolderish')
and obj.isPrincipiaFolderish
):
result.append(obj)
return result

def __browser_default__(self, request):
""" Set default so we can return whatever we want instead
of index_html """
2 changes: 2 additions & 0 deletions news/3323.bugifx
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix #3323DX-Site-Root: ZMI Nav-Tree is no longer expandable.
[jensens]

0 comments on commit a3d920b

Please sign in to comment.