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

Bruno Silva bruno at techwave.org
Tue Mar 30 09:10:29 EST 2004


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





More information about the Zope mailing list