Skip to main content

Introduction

This package adds a patch to Plone to ensure that call catalog queries are ‘rooted’ to the current navigation root (as defined by the INavigationRoot interface). When installed, all catalog queries will have an implicit path parameter that limits search results to within the current navigation root, unless a path or UID parameter is explicitly provided. This avoids “leakage” of search results, portlet listings and the like. If a UID parameter is present, known content can be explicitly searched.

In this context, the navigation root must be:

  • A folderish object

  • That provides the INavigationRoot marker interface

  • And is a “component site” in the Zope 3 Component Architecture sense

The ‘collective.lineage’ product provides a user friendly way to create such types.

The navigation root will be kept as a thread local variable, in the same way that the component site is accessible via the global getSite() function. To get hold of the current traversed-over navigation root, you can use:

from collective.rooter import getNavigationRoot

current_root = getNavigationRoot()

The root may be None if no INavigationRoot has been traversed over.

Changelog

1.0 (2015-07-15)

  • If UID is given in the catalog search keywords, don’t apply the INavigationRoot path. This allows for explicit queries for known objects in other areas of the portal. Obsoletes pull-request #1. [thet]

  • PEP 8. [thet]

1.0b1 (2009-03-29)

  • Initial release. [optilude]

Release files for collective.rooter 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for collective.rooter 1.0
File Size Uploaded
collective.rooter-1.0.tar.gz 10.2 kB Details

Release files / collective.rooter-1.0.tar.gz

Download URL collective.rooter-1.0.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
436873f12c1bde4c5205264d63a2d56fef1522ac62833f7c8d83dea1a314a2ac
BLAKE2b-256 checksum
How to use checksums
df9e4a34cec80fd367eef5e2e28fd19fbca19f44408a58cef5b686f616c38d09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page