adding methods to AccessRule
Up until now, I have only used AccessRules for redirecting. I am adding additional logic to log info from the requests. I wrote a small DTML_Method to write info to a database and added it to the AccessRule <dtml-var smallscript>. However, everytime I try to save this line in the AccessRule, I get locked out of the folder and have to use "undo" to get back in. What am I doing that is offending AccessRules? TIA, Trevor
Trevor, You need to encapsulate the code with this: <dtml-unless "REQUEST.path[0][:6]=='manage' or REQUEST.path[-1][:6]=='manage'"> ... ... </dtml-unless> It applies that all requests except for your management interface will run through the code. Cheers, Paul Zwarts -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org] On Behalf Of Trevor Toenjes Sent: Wednesday, November 21, 2001 3:15 PM To: zope@zope.org Subject: [Zope] adding methods to AccessRule Up until now, I have only used AccessRules for redirecting. I am adding additional logic to log info from the requests. I wrote a small DTML_Method to write info to a database and added it to the AccessRule <dtml-var smallscript>. However, everytime I try to save this line in the AccessRule, I get locked out of the folder and have to use "undo" to get back in. What am I doing that is offending AccessRules? TIA, Trevor _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
From: "Paul Zwarts" <paz@o...> You need to encapsulate the code with this: <dtml-unless "REQUEST.path[0][:6]=='manage' or REQUEST.path[-1][:6]=='manage'"> ... ... </dtml-unless>
Thanks for that bit. Now I am no longer locked-out of the folder. But, now I get a prompt to login to Zope with a Site Error "Unauthorized error" on the publicly accessible database. (I am using TinyTablePlus for testing purposes.) -Trevor
-----Original Message----- From: Trevor Toenjes [mailto:zope@toenjes.com] Sent: Wednesday, November 21, 2001 9:15 AM To: zope@zope.org Subject: adding methods to AccessRule
Up until now, I have only used AccessRules for redirecting. I am adding additional logic to log info from the requests. I wrote a small DTML_Method to write info to a database and added it to the AccessRule <dtml-var smallscript>.
However, everytime I try to save this line in the AccessRule, I get locked out of the folder and have to use "undo" to get back in. What am I doing that is offending AccessRules?
TIA, Trevor
participants (2)
-
Paul Zwarts -
Trevor Toenjes