[Zope] Re: Getting at third-party modules in dtml?
Dieter Maurer
dieter at handshake.de
Wed Sep 21 14:12:05 EDT 2005
Paul Winkler wrote at 2005-9-20 14:02 -0500:
> ...
>I have to say that's pretty darn obscure behavior.
>It's the antithesis of self-documenting, and I've never seen it used
>before. Is this documented somewhere?
It is the ancient product initialization -- used by the first
products: e.g. DTML Document and Method and ZSQL Method.
It was superceeded by product local constructors -- for the obvious
reason to avoid name clashes.
> ...
>Also, AFAICT there's no way to declare security on that function.
>(which is OK in this case since I wanted something 'public' anyway).
It is -- if you know and use the implementation details
of Zope's security subsystem:
To protect a method "m" with permission "p",
you assign "PermissionRole(p)" to "m__roles__".
Not that a maintainer (without the same detailed knowledge
about the security subsystem) would understand such
a "method" -- unless you had put in an explaining comment...
--
Dieter
More information about the Zope
mailing list