[Zope-PAS] Re: id mangling

Mark Hammond mhammond at skippinet.com.au
Tue May 17 22:55:26 EDT 2005

> The initial work is done (scrubbing 
> PAS of expectations of mangled ids), I think all we need now is a way 
> to have the plugins to assert they want to use a prefix. I 
> imagine this 
> would be some property of the plugin and if you need multiple plugins 
> to play along together, you'd make the same assignment on each.

Along with Cameron, I'm starting to have a bit of a look at this.  Looking back over the archives, I found a mail from Lennart that went into slightly more detail:

: It was decided that you define the prefix for each plugin, as a 
: configuration setting or that plugin. That will mean that extractor, 
: authenticator and enumerator plugins with that prefix will only work 
: with plugins e/a/e plugins with the same prefix.

: Default will be no prexfix, meaning that all plugins will work with all 
: other plugins.

There seem to be 2 basic ways of approaching this in zbir_fixing_ids_branch

1) Re-instate the concept of _mangleId(), but change the implementation (and params) to add a prefix only if the plugin wants one.  This would also appear to involve adding the concept of the prefix to the interface.

2) Keep this concept internal to the plugin itself.  The plugin becomes responsible for adding or removing the prefix as appropriate.

(1) seems right to me here.

Once either of them is done, the ZMI for existing plugins will need to grow the ability to set this prefix, and existing plugins will need to review their use of the mangle functions (the details of which depend on 1 or 2 above)

Am I on the right track here?  I so, can someone offer me guidance on (1) and (2) above?



More information about the Zope-PAS mailing list