I've installed SiteAccess 2.0, and am attempting to set an access rule for a ZClass that I'm defining. The problem is that everytime I attempt to define one of my DTML methods as an access rule it returns (eg): "ProcessURL" is not the Id of a method of this object If however I go and create a "real" folder, not a ZCLass, and put the same ProcessURL DTML method in as an access rule, it works fine. Is it not possible to define an access rule for a ZClass? 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... -- J C Lawrence Home: claw@kanga.nu ----------(*) Other: coder@kanga.nu --=| A man is as sane as he is dangerous to his environment |=--
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:
and to then have all the cruft after the X be pre-processed as the seeds of an SQL query, so that for instance:
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
participants (2)
-
Evan Simpson -
J C Lawrence