[Zope-PAS] Duplicate pulgin types created by
PluginRegistry.exportimport._updatePluginRegistry
Ross Patterson
me at rpatterson.net
Tue Dec 19 04:32:35 EST 2006
I recently wired together the GenericSetup handlers from PAS in an
extension profile for another product. This way I can support fully
declaritive import/export steps for setting up a PAS user folder
within a CMF GS profile using the PAS subdirectory. As such we can
avoid the declaritive abuse of GS used in borg, membrane, remember,
etc..
It all worked great with a minimum of code in the other product with
one exception. If a plugin type and active plugins for that type have
been configured previously (whether by a GS profile or not) then
registering the plugin type again with a new list of active plugins
will result in duplicates in registry._plugin_types (as in
acl_users.plugins._plugin_types). This doesn't actually break any
functionality but results in duplicates in the PAS ZMI.
Attached is a small patch that avoids this rather simply. I'd love to
see it merged so I don't have to maintain changed copies in my own
product to have extension profiles that modify a PAS UF configuration.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PluginRegistry.diff
Type: text/x-diff
Size: 682 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope-pas/attachments/20061219/b4ea73a1/PluginRegistry.bin
-------------- next part --------------
I've also attached the module within my product's exportimport package
and the overrides.zcml used in case this is of interest to anyone.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pas.py
Type: text/x-python
Size: 1229 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope-pas/attachments/20061219/b4ea73a1/pas.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: overrides.zcml
Type: application/octet-stream
Size: 486 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope-pas/attachments/20061219/b4ea73a1/overrides.obj
-------------- next part --------------
Ross
More information about the Zope-PAS
mailing list