[Zope3-dev] Re: View permissions

Albertas Agejevas alga at pov.lt
Tue Jan 23 16:31:20 EST 2007


On Tue, Jan 23, 2007 at 04:51:30PM +0100, Philipp von Weitershausen wrote:
> Jim Fulton wrote:
> >Why not just use:
> >
> >   <adapter
> >       for="zope.schema.interfaces.ITextLine
> >            zope.publisher.interfaces.browser.IBrowserRequest"
> >       provides="zope.app.form.interfaces.IInputWidget"
> >       factory=".TextWidget"
> >       permission="zope.Public"
> >       />
> >
> >That's what I would do.
> >
> >I might even hack the TextWidget so I could just do:
> >
> >   <adapter
> >       factory=".TextWidget"
> >       permission="zope.Public"
> >       />
> >
> >I'd be happy to deprecate the view directive.
> 
> +1

I converted all view directives in that ZCML file to adapter
directives in revision 72195.

Also, I needed to register all the input widgets with
ISimpleInputWidget as the provided interface, instead of IInputWidget,
so that the errors method is accessible.

Albertas


More information about the Zope3-dev mailing list