Commit 45cc5796 authored by Christophe Dumez's avatar Christophe Dumez

Bug fixes for some actions when SSL/login cookies not found

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7364 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bb51f62f
...@@ -375,14 +375,13 @@ print \'\'\'\n ...@@ -375,14 +375,13 @@ print \'\'\'\n
function log(){\n function log(){\n
//hide popup\n //hide popup\n
document.getElementById(\'menudiv\').style.display = "none";\n document.getElementById(\'menudiv\').style.display = "none";\n
open(\'%s/BusinessTemplate_doSvnLog?file=\'+tree.getSelectedItemId(), \'_self\');\n open(\'%s/BusinessTemplate_doSvnLog?added=\'+tree.getSelectedItemId(), \'_self\');\n
//open(\'/BusinessTemplate_viewSvnLog?file=\'+tree.getSelectedItemId(), \'_self\');\n
}\n }\n
\n \n
function ls(){\n function ls(){\n
//hide popup\n //hide popup\n
document.getElementById(\'menudiv\').style.display = "none";\n document.getElementById(\'menudiv\').style.display = "none";\n
open(\'%s/BusinessTemplate_doSvnLs?file=\'+tree.getSelectedItemId(), \'_self\');\n open(\'%s/BusinessTemplate_doSvnLs?added=\'+tree.getSelectedItemId(), \'_self\');\n
}\n }\n
</script>\n </script>\n
\'\'\'% (context.getId(), context.getId(), context.getId(), context.absolute_url(), context.absolute_url(), context.absolute_url(), context.absolute_url(), context.absolute_url(), context.absolute_url(), context.absolute_url(), context.absolute_url())\n \'\'\'% (context.getId(), context.getId(), context.getId(), context.absolute_url(), context.absolute_url(), context.absolute_url(), context.absolute_url(), context.absolute_url(), context.absolute_url(), context.absolute_url(), context.absolute_url())\n
......
...@@ -68,17 +68,14 @@ ...@@ -68,17 +68,14 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
from Products.ERP5Subversion.SubversionClient import SubversionSSLTrustError, SubversionLoginError\n from Products.ERP5Subversion.SubversionClient import SubversionSSLTrustError\n
from Products.ERP5Type.Document import newTempBase\n from Products.ERP5Type.Document import newTempBase\n
\n \n
try:\n try:\n
log_list = context.getPortalObject()["portal_subversion"].log(file, context)\n log_list = context.getPortalObject()["portal_subversion"].log(added, context)\n
except SubversionSSLTrustError, error:\n except SubversionSSLTrustError, error:\n
context.REQUEST.set(\'portal_status_message\', \'SSL Certificate was not recognized\')\n context.REQUEST.set(\'portal_status_message\', \'SSL Certificate was not recognized\')\n
return context.asContext(trust_dict = error.getTrustDict(), caller=\'log\', file=file).BusinessTemplate_viewSvnSSLTrust()\n return context.asContext(trust_dict = error.getTrustDict(), caller=\'log\', added=added).BusinessTemplate_viewSvnSSLTrust()\n
except SubversionLoginError, error1 :\n
context.REQUEST.set(\'portal_status_message\', \'Server needs authentication, no cookie found\')\n
return context.asContext(caller=\'log\', file=file, realm = error1.getRealm(), username = context.getPortalObject()["portal_subversion"].getPreferredUsername()).BusinessTemplate_viewSvnLogin()\n
\n \n
if not log_list:\n if not log_list:\n
return []\n return []\n
...@@ -109,7 +106,7 @@ return context.BusinessTemplate_viewSvnLog()\n ...@@ -109,7 +106,7 @@ return context.BusinessTemplate_viewSvnLog()\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>file,**kw</string> </value> <value> <string>added,**kw</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -135,11 +132,10 @@ return context.BusinessTemplate_viewSvnLog()\n ...@@ -135,11 +132,10 @@ return context.BusinessTemplate_viewSvnLog()\n
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>file</string> <string>added</string>
<string>kw</string> <string>kw</string>
<string>Products.ERP5Subversion.SubversionClient</string> <string>Products.ERP5Subversion.SubversionClient</string>
<string>SubversionSSLTrustError</string> <string>SubversionSSLTrustError</string>
<string>SubversionLoginError</string>
<string>Products.ERP5Type.Document</string> <string>Products.ERP5Type.Document</string>
<string>newTempBase</string> <string>newTempBase</string>
<string>_getattr_</string> <string>_getattr_</string>
...@@ -147,7 +143,6 @@ return context.BusinessTemplate_viewSvnLog()\n ...@@ -147,7 +143,6 @@ return context.BusinessTemplate_viewSvnLog()\n
<string>context</string> <string>context</string>
<string>log_list</string> <string>log_list</string>
<string>error</string> <string>error</string>
<string>error1</string>
<string>object_list</string> <string>object_list</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>my_dict</string> <string>my_dict</string>
......
...@@ -83,8 +83,6 @@ elif caller == \'updatewc\':\n ...@@ -83,8 +83,6 @@ elif caller == \'updatewc\':\n
return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/BusinessTemplate_doSvnUpdatewc\')\n return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/BusinessTemplate_doSvnUpdatewc\')\n
elif caller == \'commit\':\n elif caller == \'commit\':\n
return context.BusinessTemplate_doSvnCommit(changelog=changelog,added=added,removed=removed,modified=modified)\n return context.BusinessTemplate_doSvnCommit(changelog=changelog,added=added,removed=removed,modified=modified)\n
elif caller == \'ls\':\n
return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/BusinessTemplate_doSvnLs?file=\'+context.REQUEST[\'file\'].replace(\'%20\',\'%2520\').replace(\' \',\'%20\'))\n
elif caller == \'log\':\n elif caller == \'log\':\n
return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/BusinessTemplate_doSvnLog?file=\'+context.REQUEST[\'file\'].replace(\'%20\',\'%2520\').replace(\' \',\'%20\'))\n return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/BusinessTemplate_doSvnLog?file=\'+context.REQUEST[\'file\'].replace(\'%20\',\'%2520\').replace(\' \',\'%20\'))\n
elif caller == \'info\':\n elif caller == \'info\':\n
......
...@@ -66,20 +66,16 @@ ...@@ -66,20 +66,16 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from Products.ERP5Subversion.SubversionClient import SubversionSSLTrustError, SubversionLoginError\n <value> <string>from Products.ERP5Subversion.SubversionClient import SubversionSSLTrustError\n
\n
try:\n try:\n
infos_list = context.getPortalObject()["portal_subversion"].ls(file, context)\n infos_list = context.getPortalObject()["portal_subversion"].ls(added, context)\n
except SubversionSSLTrustError, error:\n except SubversionSSLTrustError, error:\n
context.REQUEST.set(\'portal_status_message\', \'SSL Certificate was not recognized\')\n context.REQUEST.set(\'portal_status_message\', \'SSL Certificate was not recognized\')\n
return context.asContext(trust_dict = error.getTrustDict(), file=file, caller=\'ls\').BusinessTemplate_viewSvnSSLTrust()\n return context.asContext(trust_dict = error.getTrustDict(), added=added, caller=\'ls\').BusinessTemplate_viewSvnSSLTrust()\n
except SubversionLoginError, error1 :\n
context.REQUEST.set(\'portal_status_message\', \'Server needs authentication, no cookie found\')\n
return context.asContext(caller=\'ls\', file=file, realm = error1.getRealm(), username = context.getPortalObject()["portal_subversion"].getPreferredUsername()).BusinessTemplate_viewSvnLogin()\n
if infos_list:\n if infos_list:\n
return context.asContext(infos_dict=infos_list[0], file=file, edit_path=context.getPortalObject()["portal_subversion"].editPath(context, file)).BusinessTemplate_viewSvnInfosFile()\n return context.asContext(infos_dict=infos_list[0], file=added, edit_path=context.getPortalObject()["portal_subversion"].editPath(context, added)).BusinessTemplate_viewSvnInfosFile()\n
else:\n else:\n
return context.asContext(infos_dict=False, file=file, edit_path=context.getPortalObject()["portal_subversion"].editPath(context, file)).BusinessTemplate_viewSvnInfosFile()\n return context.asContext(infos_dict=False, file=added, edit_path=context.getPortalObject()["portal_subversion"].editPath(context, added)).BusinessTemplate_viewSvnInfosFile()\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -94,7 +90,7 @@ else:\n ...@@ -94,7 +90,7 @@ else:\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>file</string> </value> <value> <string>added</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -120,16 +116,14 @@ else:\n ...@@ -120,16 +116,14 @@ else:\n
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>file</string> <string>added</string>
<string>Products.ERP5Subversion.SubversionClient</string> <string>Products.ERP5Subversion.SubversionClient</string>
<string>SubversionSSLTrustError</string> <string>SubversionSSLTrustError</string>
<string>SubversionLoginError</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>context</string> <string>context</string>
<string>infos_list</string> <string>infos_list</string>
<string>error</string> <string>error</string>
<string>error1</string>
<string>False</string> <string>False</string>
</tuple> </tuple>
</value> </value>
......
...@@ -86,9 +86,9 @@ elif caller == \'updatewc\':\n ...@@ -86,9 +86,9 @@ elif caller == \'updatewc\':\n
elif caller == \'commit\':\n elif caller == \'commit\':\n
return context.BusinessTemplate_doSvnCommit(changelog=changelog,added=added,removed=removed,modified=modified)\n return context.BusinessTemplate_doSvnCommit(changelog=changelog,added=added,removed=removed,modified=modified)\n
elif caller == \'ls\':\n elif caller == \'ls\':\n
return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/BusinessTemplate_doSvnLs?file=\'+context.REQUEST[\'file\'].replace(\'%20\',\'%2520\').replace(\' \',\'%20\'))\n return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/BusinessTemplate_doSvnLs?added=\'+added.replace(\'%20\',\'%2520\').replace(\' \',\'%20\'))\n
elif caller == \'log\':\n elif caller == \'log\':\n
return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/BusinessTemplate_doSvnLog?file=\'+context.REQUEST[\'file\'].replace(\'%20\',\'%2520\').replace(\' \',\'%20\'))\n return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/BusinessTemplate_doSvnLog?added=\'+added.replace(\'%20\',\'%2520\').replace(\' \',\'%20\'))\n
elif caller == \'info\':\n elif caller == \'info\':\n
return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/BusinessTemplate_doSvnInfo\')\n return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/BusinessTemplate_doSvnInfo\')\n
elif caller == \'switch\':\n elif caller == \'switch\':\n
......
...@@ -283,7 +283,7 @@ ...@@ -283,7 +283,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python:here.REQUEST[\'file\']</string> </value> <value> <string>python:here.REQUEST[\'added\']</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -279,7 +279,7 @@ ...@@ -279,7 +279,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python: here.getPortalObject()["portal_subversion"].getHeader(here, here.REQUEST[\'file\'])</string> </value> <value> <string>python: here.getPortalObject()["portal_subversion"].getHeader(here, here.REQUEST[\'added\'])</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment