[Product-Developers] Re: Product is registering without installing
Hanno Schlichting
plone at hannosch.info
Sat Jan 12 02:27:29 UTC 2008
Takahashi, Mike wrote:
> I am working on a product that will add extra local roles managed in the
> @@sharing view in Plone (sharing tab).
>
> I've added the necessary code into configure.zcml and localroles.py of
> my product. However, when I place my product within the /Products
> directory the new local roles appear within the sharing tab of existing
> and newly created Plone instances, even though my Product has never been
> installed. I would like to be able to only have these roles apply when
> the Product is installed. Any help is greatly appreciated!
Configuration in ZCML will be executed at Zope startup and is inherently
global. Utilities defined in ZCML will be registered with the global
site manager.
You can try to move the utility registrations to a GenericSetup
extension profile into a componentregistry.xml file. When you install
that profile into a specific Plone site, the utilities will be added to
the local persistent site manager in the Plone site root, thus making
them local to the instance.
I'm not 100% certain that this works but see no specific reason why it
shouldn't work. After all these are just normal utilities.
Hanno
More information about the Product-Developers
mailing list