tags:

views:

8

answers:

1

I have a custom portlet manager, and I'd like to blacklist (aka block) context (aka parent) portlets by default. I've found a couple of methods but they either require a specific location (so not sitewide) or will only work if I'm in a different package to where the portlet manager is defined (setuphanders.py is run before portlets.xml is imported and therefore the portlet manager doesn't exist yet), which is not a runner.

What I'd really like to do is use the genericSetup blacklist syntax in portlets.xml with a '*' for the location like this:

<blacklist
  manager="custom.portletmanager"
  location="*"
  category="context"
  status="block"
  />

But, alas, that doesn't seem to work. Any suggestions?

A: 

Perhaps you can override some permission on the portlet (possibly in overrides.zcml), requiring a non-existing permission?

Alternatively, there's a z3c.unconfigure package that may be able to unregister the portlet entirely.

Ivo van der Wijk