Skip to content

Commit

Permalink
Merge pull request #3367 from plone/fix-3323
Browse files Browse the repository at this point in the history
fix #3323
  • Loading branch information
jensens authored Nov 25, 2021
2 parents 2d95fbf + c8d8805 commit 6a951f9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Products/CMFPlone/Portal.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,16 @@ def __before_publishing_traverse__(self, arg1, arg2=None):

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

# Concept 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
return sorted(
(obj for obj in self.objectValues() if getattr(aq_base(obj), 'isPrincipiaFolderish', False)),
key=lambda obj: obj.getId(),
)

def __browser_default__(self, request):
""" Set default so we can return whatever we want instead
of index_html """
Expand Down
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 6a951f9

Please sign in to comment.