[Zope3-checkins] SVN: Zope3/trunk/ Added support for removing a principal from a principal registry. We're using this to update principal info (via replace) for a management tool that lets an admin change his or her login/password without reprocessing

Garrett Smith garrett at mojave-corp.com
Sat Mar 12 12:55:53 EST 2005


Stephan Richter wrote:
> removing a principal from a principal registry. We're using this to
> update principal info (via replace) for a management tool that lets an
> admin change his or her login/password without reprocessing
> 
> 
> On Friday 11 March 2005 19:40, Garrett Smith wrote:
>>> I think this change needs to be discussed more. Global registries,
>>> like the principal registry, should not support any modification and
>>> deletion in their API! Only ZCML can setup global components.
>> 
>> I think you'll find pressure to change this policy if Zope is used
>> as an embedded server. If I'm the only one who ever needs this, I
>> suppose I'll just hack the private attributes of the registry.
> 
> You might be right that it will be necessary. But it is a fairly big
> paradigm shift and this is what needs to be discussed. I would like
> to have a proposal clearly describing the need for such a feature and
> eventually a final word from the pope.
> 
> Here is the issue I see. The principal registry is just an example of
> the general idea of allowing modification of global components. If we
> allow modifications to global components, we might open a can of
> worms that we are not seeing right now. It might mean that we
> endanger the integrity of the entire system. On the other hand, I see
> great benefit from such a move. For example, we could register
> "reverse handlers" for ZCML directives, which would allow us to
> reload ZCML files from a running server and thus implement the
> refresh feature. 

I agree fully...it's too big an issue to suffer minor tweaks here and
there for one-off applications. It should be clear over time whether
this is a general issue or not. For the time being, I'm just hacking the
registry. (Python helps us get along! :)

A middle ground might be to support very specific 'refresh'
functionality via interface/adapter (not ZCML). I don't know if it makes
sense to address this via ZCML because the changes to the server will be
made programmatically -- otherwise you might as well just restart the
process.

But again, if I'm the only one looking for this, it's not worth worrying
about.

 -- Garrett


More information about the Zope3-Checkins mailing list