Hello, I'm struggling with a portal-tabs issue and hoping to get some suggestions.
I have automatic tab generation disabled, and am managing the set of tabs explicitly through the ZMI via portal_actions/portal_tabs. But I need for each tab to display conditionally, only when the user actually has 'View' permission on the target location for the tab. This is one of the things that happens 'for free' when automatic tab generation is enabled, but which is lost as soon as I start doing the tab management manually, and I need to recreate the behavior. It looks like the permission filter for automatic tabs happens when the portal_catalog is searched using a query that's crafted in CatalogNavigationTabs.topLevelTabs(). I.e. -- the catalog itself is doing the view permission check (similar to how the navigation portlet gets constructed, presumably). So at first glance it seems like I might have to do a catalog query (or multiple queries) to get the same effect for my manual tabs, and I'm hoping there's a smarter way to do this. Basically -- what it seems like I need is a checkPermission() call that works on portal path strings rather than directly on portal objects. Or the functional equivalent. Any ideas? Apologies if this isn't appropriate for product-developers. I suppose I'm doing this as part of a 'policy product' for a deployment, if that counts. :) regards, -hoss David Hostetler [email protected] _______________________________________________ Product-Developers mailing list [email protected] http://lists.plone.org/mailman/listinfo/product-developers
