[Zope] Please help! can't do a redirect in a access rule

Bruno Silva bruno at techwave.org
Tue Mar 30 11:17:07 EST 2004


Hi again,
    I create a new folder, and did the same access rule, and it worked,
after some debuging, i figure that it doesn't work, when i have a
template in the folder, that call's a macro from other template in other
folder. Does this make any sense?



On Tue, 2004-03-30 at 15:10, Bruno Silva wrote:
> Hi,
>     I'm trying to give access to a folder, only if a user has a value in
> is session. I configured a Site Access Rule that looks like this:
> 
> 
> if context.REQUEST['BASE0'].find('zope') > -1:
>     return #does nothing for now
> elif context.REQUEST.SESSION.has_key('give_access'):
>     return #does nothing for now
> context.REQUEST.RESPONSE.redirect(context.REQUEST['BASE0'])
> 
> 
>     I search for the word "zope" on the url base, to have always access
> to the workspace virtual host.
> 
>     If this is not the best way to do this, please feel free to give
> sugestions.
> 
> 
> thanks,
> --Bruno
> 
> 
> 
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
-- 
Bruno Silva <bruno at techwave.org>




More information about the Zope mailing list