[Zope3-dev] Allowing views to be registered for classes ratherthaninterfaces.

Martijn Faassen faassen@vet.uu.nl
Sat, 19 Jul 2003 00:47:05 +0200


Garrett Smith wrote:
> Yeah, I suppose I was thinking of something more like:
> 
> <class class="Foo" auto_interface="IFoo">
>     <method name="bar" permission="..." >
>         <contract args="x y=None">
>             Returns such and such.
>         </contract>
>     </method>
> </class>
> 
> This does look pretty silly, but I'm trying to leverage the fact that
> developers have to define security for their classes anyway. Is there
> some way to work the 'public contract' aspect of an interface into this
> process?

It would make more sense in this case to allow such security declarations
on the interface description, instead of making people write the same
in ZCML. Anyway, this fails if the goal is minimal burden for maximum
gratification by the scripter.

Regards,

Martijn