Roger, I wonder if what you're looking for could be accommodated via the
"Tools" idiom. I dont use tools myself, but I've heard they're used by
some. From what I understand, tools might be a way to expose specific
utility configuration settings via a higher level interface.
Roger Ineichen wrote:
> pluggableauthentication utility
> Hi Garrett
> From: Garrett Smith [mailto:[EMAIL PROTECTED]
>> Sent: Saturday, June 18, 2005 7:52 PM
>> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
>> Cc: firstname.lastname@example.org; email@example.com
>> Subject: RE: [Zope3-dev] Utility Registration was:RE:
>> [Zope3-Users] pluggableauthentication utility
>>> What do yo think about that? Any other ideas?
>> It looks like you've identified a common enough use case: PAUs are
>> typically used with a common set of plugins. The current PAU design
>> accommodates all sorts of use cases that most users would never face.
>> Rather than add more complexity to the registration process with
>> "utilityPolicy" (even though it's an attempt to make things easier
>> for the user), I'd suggest creating a
>> SimplePluggubleAuthenticationUtility that supported the most common
>> use cases.
>> Something like this perhaps:
>> class ISimplePAU(Interface):
>> authentication = Choice(values=('HTTP-Auth', 'Session'))
>> allowUserChangeOnUnauthorized = Bool()
>> principals = Attribute("A PrincipalsFolder plugin.")
>> This would be far easier to deal with than the current PAU for those
>> that don't need PAU's flexibility.
> I think this isn't a solution, because of three things:
> - You need to do this for every other utility simplification.
> - I dont' like to have more then one implementation if not
> absolutly needed only for configuration reason.
> - The activation part on the registration process is still
> the same. The most problem is that we implement components
> where using the utility and lookup this utilities by a special
> name or unnamed. But nobody tells you what name should be used
> during registration.
> I still think a policy (somthing like a add wizard) whould solve
> the problem. Developers can develope the registration process in
> a pytho class and register tehm as a "utilityPolicy". Then
> administrators or scripters can add the utility witha simple klick
> on a "add predefined utility" button.
> On nice sideeffect whould be,
> You could also add a policy "Add all utility I need for a site".
> Or even call this policy during makeSite on your special
> implementation of IPossibleSite.
> I think this is what we need at the enduser level and should be
> possible to implement. Of corse the way we register utilites whould
> be still available.
> Roger Ineichen
> Projekt01 GmbH
> END OF MESSAGE
>> -- Garrett
Zope3-dev mailing list