[Zope] Re: SiteAccess, ZZClass, and Set Access Rule
Evan Simpson
evan@4-am.com
Sat, 15 Jan 2000 09:32:20 -0600
J C Lawrence wrote:
> Is it not possible to define an access rule for a ZClass?
I hadn't tried it, or really given much thought to it. The tricky bit
here, of course, is that you don't really want an Access Rule in your
ZClass but in *instances* of your ZClass, right?
Probably the best way to handle this is to set the Access Rule as part
of your ZClass initialization method. You would call
self.manage_addProduct.SiteAccess.manage_addAccessRule(method_id='yourmethod').
> FWIW the problem I'm attempting to solve is to have an URL. sauy:
>
> http://site/X/
>
> and to then have all the cruft after the X be pre-processed as the
> seeds of an SQL query, so that for instance:
>
> http://site/X/Q/R/S
>
> would go and dig up some set of nested SQL queries based on Q, R,
> and S and then throw them at the index_html in X. SiteAccess seemed
> the way to do this...
Sure, path mangling is what Access Rules do best! Once you have this
working, please consider writing a Howto.
Cheers,
Evan @ 4-am