Problem SESSION with Zope 2.7.3b1-0
I have problem using Session with Zope 2.7.3b1-0. I define one set in Session and when I execute one get the Session object not response. Someone was have this problem? I applied package iHotfix 0.4 and don`t was obtain success. Regards, -- Andre Amram Duque Analista de Sistemas Senior VARIG Brazilian Airlines - RIONS GGTI - Gerencia Geral de Tecnologia da Informacao Tel.: + 55-0XX-21-3814-5920 Fax:: + 55-0XX-21-3814-5796 e-mail: andre.duque@varig.com
--On Mittwoch, 8. Dezember 2004 11:52 Uhr -0200 André Amram Duque <andre.duque@varig.com> wrote:
I have problem using Session with Zope 2.7.3b1-0. I define one set in Session and when I execute one get the Session object not response.
Please provide a reasonable description of the problem. It is hard to understand what your problem with from this one sentence. -aj
Andreas Jung, My problem when use SESSION is below code : <!-- (AD)Administrador visualiza --> * <span tal:condition="python:request.SESSION.get('tipoAcesso') == 'AD'">* <a href="tela_manuntencao.html" class='menu_linkseg'>Manutenção</a> | This variable *tipoAcesso* return null this version Zope 2.7.3b1, but this code in version 2.7.0 and 2.7.3 return with value correct. The code in ZPT and python script implemented follow attached. Conclusion: How can I decide with this version 2.7.3b1? Regards, André Amram Duque Andreas Jung wrote:
--On Mittwoch, 8. Dezember 2004 11:52 Uhr -0200 André Amram Duque <andre.duque@varig.com> wrote:
I have problem using Session with Zope 2.7.3b1-0. I define one set in Session and when I execute one get the Session object not response.
Please provide a reasonable description of the problem. It is hard to understand what your problem with from this one sentence.
-aj
-- Andre Amram Duque Analista de Sistemas VARIG Brazilian Airlines - RIONS GGTI - Gerencia Geral de Tecnologia da Informacão Tel.: + 55-0XX-21-3814-5920 Fax:: + 55-0XX-21-3814-5796 e-mail: andre.duque@varig.com <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--Macro definição template/html --> <html metal:define-macro="master"> <head> <!--Slot de cabeçalho --> <metal:head define-slot="head"/> <title>::: | DF-10 On-line | :::</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="static/css/estilos.css" rel="stylesheet" type="text/css"> <script TYPE="text/javascript" LANGUAGE="JavaScript" SRC="static/js/checar.js"></script> <style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } --> </style> </head> <!-- / Slot de cabeçalho --> <body OnLoad="begintimer()" background="static/imagem/fundo_tabela.jpg"> <map name="Map"> <area shape="rect" coords="583,5,754,45" onClick="abrir_janela();" href="#" alt="http://iwww.varig.com.br"></map> <map name="Map2"> <area shape="rect" coords="0,1,142,14" onClick="tela_impressao();" href="#"> </map> <table width="100%" height="100%" border="0" align="center" cellpadding="2" cellspacing="0" > <tr> <td height="667" align="center" valign="middle" background="static/imagem/fundo_tabela.jpg"> <!-- Primeiras linhas da tabela com figura e menubar --> <table width="760" height="420" border="1" align="center" cellpadding="0" cellspacing="0"> <tr valign="top"> <td align="center" valign="top" ><img src="static/imagem/cabecalho.jpg" width="760" height="77" border="0" usemap="#Map"></td> </tr> <tr> <td height='16' align='center' valign='middle' bgcolor="#F5F5F5" class='fundo1'> <span><nobr><span class='menu_linkseg'> <a href="tela_abertura.html" class='menu_linkseg'>Página Inicial</a> | <a href="tela_solicitacao.html" class='menu_linkseg'>Preencher Formulário</a> | <a href="tela_acompanhamento.html" class='menu_linkseg'>Acompanhamento</a> | <a href="#" onclick="tela_normas()" class='menu_linkseg'>Norma de Investimentos</a> | <!-- (AD)Administrador visualiza --> <span tal:condition="python:request.SESSION.get('tipoAcesso') == 'AD'"> <a href="tela_manutencao.html" class='menu_linkseg'>Manutenção</a> | </span> <!-- (AD)Administrador e (GE)Gerente visualiza relatório --> <span tal:condition="python:request.SESSION.get('tipoAcesso') == 'AD' or request.SESSION.get('tipoAcesso') == 'GE'"> <a href="tela_relatorio.html" class='menu_linkseg'>Relatório</a> | </span> <a href="template/tela_download.html" class='menu_linkseg'>Arquivos</a> | <a href="#" class='menu_linkseg' onClick="Logout();">Logout</a><a name="Topo"></a> </span><nobr></span> </td> </tr> <td width="760" height="610" valign="top" align="left" bgcolor="#F5F5F5"> <!--Slot body --> <span metal:define-slot="body"></span> <!--Slot body --> </td> </table> </td> </tr> </table> </body> </html> # # Metodo para validação de usuário na aplicação # Variavel emailUsuario guarda em sessão nome/email corporativo # Variavel tipoAcesso guarda em sessão tipo de acesso a aplicação # from Products.PythonScripts.standard import html_quote from AccessControl import getSecurityManager request = container.REQUEST RESPONSE = request.RESPONSE SESSION = request.SESSION context.portal_skins.updateSkinCookie() emailUsuario = getSecurityManager().getUser().getUserName().upper() SESSION["emailUsuario"] = emailUsuario tipoAcesso = "" resultSetTipoUsuario = container.zsql_consulta_usuario_tipo_acesso(email_usuario=emailUsuario) if len(resultSetTipoUsuario): tipoAcesso = container.zsql_consulta_usuario_tipo_acesso(email_usuario=emailUsuario)[0][0].upper() SESSION["tipoAcesso"] = tipoAcesso if context.portal_membership.isAnonymousUser(): RESPONSE.expireCookie('__ac', path='/') RESPONSE.redirect('index_html?msg=*** USUÁRIO OU SENHA INVÁLIDO ! ***') return 0 RESPONSE.redirect('abre_tela.html')
participants (2)
-
Andreas Jung -
André Amram Duque