Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue where catalog search with path failed when path had inaccessible (private) levels #1996

Merged
merged 2 commits into from
Apr 10, 2017

Conversation

datakurre
Copy link
Member

@datakurre datakurre commented Apr 7, 2017

restrictedTraverse from the navigation root should be used with care, because there might be inaccessible levels for the current user between the root and target.

Please, see how catalog brains do their restricted getObject by doing unrestrictedTraverse to the parent of the target and then restrictedTraverse to the target:

https://github.com/zopefoundation/Products.ZCatalog/blob/master/src/Products/ZCatalog/CatalogBrains.py#L66

datakurre referenced this pull request Apr 7, 2017
Checked for ``AccessInactivePortalContent`` for each path in a catalog query.
This solves a problem, where Editors couldn't see inactive content, even though they had the required permission on a subpath of the portal (e.g. a subsite).
@datakurre datakurre force-pushed the datakurre-restrictedTraverse branch from 01e8c46 to 4ef9bc7 Compare April 10, 2017 06:59
@datakurre datakurre requested a review from thet April 10, 2017 06:59
@datakurre datakurre force-pushed the datakurre-restrictedTraverse branch from 4ef9bc7 to f83bf85 Compare April 10, 2017 07:48
@datakurre datakurre removed the request for review from thet April 10, 2017 07:50
@thet
Copy link
Member

thet commented Apr 10, 2017

Looks good to me.

@thet thet merged commit ea027cd into master Apr 10, 2017
@thet thet deleted the datakurre-restrictedTraverse branch April 10, 2017 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants