From 9dbe7dab342bc492aa7f19192b211f2121017778 Mon Sep 17 00:00:00 2001 From: Vincent Pelletier <vincent@nexedi.com> Date: Wed, 26 Nov 2008 13:34:22 +0000 Subject: [PATCH] Instead of raising, redirect user to document with an error message in portal status. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24706 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../CashDetail_saveFastInputLine.xml | 20 +++++++++---------- bt5/erp5_banking_core/bt/revision | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CashDetail_saveFastInputLine.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CashDetail_saveFastInputLine.xml index 0fddb3b32c..f217106e5b 100644 --- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CashDetail_saveFastInputLine.xml +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CashDetail_saveFastInputLine.xml @@ -67,14 +67,15 @@ <key> <string>_body</string> </key> <value> <string encoding="cdata"><![CDATA[ +request = context.REQUEST\n +N_ = context.Base_translateString\n +\n from AccessControl import getSecurityManager\n u=getSecurityManager().getUser()\n ADD_PERMISSION = \'Add portal content\'\n if not u.has_permission(ADD_PERMISSION,context):\n - raise ValueError, "How did you manage to be there ???"\n -\n -request = context.REQUEST\n -N_ = context.Base_translateString\n + request[ \'RESPONSE\' ].redirect(\'%s/view?portal_status_message=%s\' % (context.absolute_url(), N_("You can\'t modify that document any longer.")))\n + return\n \n def recurse(document):\n result = document.hasActivity()\n @@ -410,20 +411,19 @@ else:\n <string>listbox</string> <string>form_id</string> <string>kw</string> - <string>AccessControl</string> - <string>getSecurityManager</string> <string>_getattr_</string> - <string>u</string> - <string>ADD_PERMISSION</string> <string>context</string> - <string>ValueError</string> <string>request</string> <string>N_</string> + <string>AccessControl</string> + <string>getSecurityManager</string> + <string>u</string> + <string>ADD_PERMISSION</string> + <string>_getitem_</string> <string>recurse</string> <string>deleteContent</string> <string>cell_base_id</string> <string>line_kwd</string> - <string>_getitem_</string> <string>variation_list</string> <string>emission_letter_list</string> <string>cash_status_list</string> diff --git a/bt5/erp5_banking_core/bt/revision b/bt5/erp5_banking_core/bt/revision index 281cd66131..2d3d9c27b6 100644 --- a/bt5/erp5_banking_core/bt/revision +++ b/bt5/erp5_banking_core/bt/revision @@ -1 +1 @@ -469 \ No newline at end of file +472 \ No newline at end of file -- 2.30.9