From edcd5b3720e9ef1963171cf08d109d30c83b1a14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-Xavier=20Algrain?= <fxalgrain@tiolive.com> Date: Tue, 31 May 2011 11:24:06 +0200 Subject: [PATCH] Fix force anonymous knowledge pad isAnonymousKnowledgePadUsed is an option and should be process like this. Set it in request earlier because this parameter is use to get list of pads --- .../Base_viewKnowledgePadMacroLibrary.xml | 6 +++--- bt5/erp5_knowledge_pad/bt/revision | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/Base_viewKnowledgePadMacroLibrary.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/Base_viewKnowledgePadMacroLibrary.xml index cf0c05fca1..7fbce41ce0 100644 --- a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/Base_viewKnowledgePadMacroLibrary.xml +++ b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/Base_viewKnowledgePadMacroLibrary.xml @@ -41,6 +41,8 @@ tal:define="global mode python: options.get(\'mode\', request.get(\'gadget_mode\', \'erp5_front\'));\n global default_pad_group python: options.get(\'default_pad_group\', request.get(\'gadget_default_pad_group\', \'\'));\n kw python: dict(mode=mode, default_pad_group=default_pad_group);\n + global isAnonymousKnowledgePadUsed python: options.get(\'use_anonymous_knowledge_pad\',request.get(\'use_anonymous_knowledge_pad\', False));\n + dummy python: request.set(\'is_anonymous_knowledge_pad_used\', isAnonymousKnowledgePadUsed);\n struct python: here.ERP5Site_getActiveKnowledgePadForUser(**kw);\n global active_knowledge_pad python: struct[0];\n global knowledge_pads python: struct[1];\n @@ -49,9 +51,7 @@ global isAnon python: here.portal_membership.isAnonymousUser();\n global waitForActivitiesOnServer python: active_knowledge_pad is None and hasUserActivity;\n global isUserAllowedToCreateKnowledgePads context/Base_isUserAllowedToUseKnowledgePad;\n - global isKnowledgePadTemplateUsed python: request.get(\'is_knowledge_pad_template_used\', 0);\n - global isAnonymousKnowledgePadUsed python: request.get(\'use_anonymous_knowledge_pad\', False);\n - dummy python: request.set(\'is_anonymous_knowledge_pad_used\', isAnonymousKnowledgePadUsed); \n + global isKnowledgePadTemplateUsed python: request.get(\'is_knowledge_pad_template_used\', 0); \n global createDefaultPadForUser python: options.get(\'create_default_pad\', False) and \n len(knowledge_pads)==0 and not hasUserActivity;\n global make_security_check python: options.get(\'make_security_check\', False);\n diff --git a/bt5/erp5_knowledge_pad/bt/revision b/bt5/erp5_knowledge_pad/bt/revision index 86ed5c7d2a..00607554c6 100644 --- a/bt5/erp5_knowledge_pad/bt/revision +++ b/bt5/erp5_knowledge_pad/bt/revision @@ -1 +1 @@ -717 \ No newline at end of file +718 \ No newline at end of file -- 2.30.9