Open jensens opened 10 months ago
Weird!
Did you check if Manager
is listed in the allowRolesAndUsers
index for foo?
What happens if you had the role Reader
?
It is not the indexed allowedRolesAndUsers
, those are fine.
It is, the context-manager adopted Manager
is not returned by the catalogs self._listAllowedRolesAndUsers
.
BUG REPORT
What I did:
What I expect to happen:
Catalog Brain of
foo
is listed in results.What actually happened:
Empty list is returned.
Preliminary analysis
Products.CMFPlone.CatalogTool.searchResults
https://github.com/plone/Products.CMFPlone/blob/64d3d97d783cb17404682d1206e6e4cf9b64100d/src/Products/CMFCore/CatalogTool.py#L175 adds theself._listAllowedRolesAndUsers
to the result. It overrides the method ofCMFCore
https://github.com/plone/Products.CMFPlone/blob/64d3d97d783cb17404682d1206e6e4cf9b64100d/src/Products/CMFCore/CatalogTool.py#L175 While in CMFCore theproxy_roles
are somehow taken into account, in the CMFPlone overrides those are ignored.Workaround
Do not use plone.api, but the catalogs
unrestrictedSearchResults
(be careful here, you may get more than you want to show).What version of Plone/ Addons I am using:
Plone 6.0.5