From 4cdbff10069a827e9d404c27939a09045e5c69b3 Mon Sep 17 00:00:00 2001
From: Gabriel Monnerat <gabriel@tiolive.com>
Date: Thu, 13 Jan 2011 20:56:02 +0000
Subject: [PATCH] don't need load preference to anonymous user

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42317 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../Base_getPreferencePathList.xml            | 61 +------------------
 bt5/erp5_web_ung_theme/bt/revision            |  2 +-
 2 files changed, 3 insertions(+), 60 deletions(-)

diff --git a/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/Base_getPreferencePathList.xml b/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/Base_getPreferencePathList.xml
index 91b72e094e..0ec9291049 100644
--- a/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/Base_getPreferencePathList.xml
+++ b/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/Base_getPreferencePathList.xml
@@ -52,6 +52,8 @@
             <key> <string>_body</string> </key>
             <value> <string>from Products.ERP5Type.JSONEncoder import encodeInJson as dumps\n
 \n
+if context.portal_membership.isAnonymousUser():\n
+  print None\n
 portal_preferences = context.portal_preferences\n
 print dumps(dict(preference=portal_preferences.getActivePreference().getRelativeUrl(), \n
              system_preference=portal_preferences.getActiveSystemPreference().getRelativeUrl()))\n
@@ -59,73 +61,14 @@ print dumps(dict(preference=portal_preferences.getActivePreference().getRelative
 return printed\n
 </string> </value>
         </item>
-        <item>
-            <key> <string>_code</string> </key>
-            <value>
-              <none/>
-            </value>
-        </item>
         <item>
             <key> <string>_params</string> </key>
             <value> <string></string> </value>
         </item>
-        <item>
-            <key> <string>errors</string> </key>
-            <value>
-              <tuple/>
-            </value>
-        </item>
-        <item>
-            <key> <string>func_code</string> </key>
-            <value>
-              <object>
-                <klass>
-                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
-                </klass>
-                <tuple/>
-                <state>
-                  <dictionary>
-                    <item>
-                        <key> <string>co_argcount</string> </key>
-                        <value> <int>0</int> </value>
-                    </item>
-                    <item>
-                        <key> <string>co_varnames</string> </key>
-                        <value>
-                          <tuple>
-                            <string>_print_</string>
-                            <string>_print</string>
-                            <string>Products.ERP5Type.JSONEncoder</string>
-                            <string>encodeInJson</string>
-                            <string>dumps</string>
-                            <string>_getattr_</string>
-                            <string>context</string>
-                            <string>portal_preferences</string>
-                            <string>dict</string>
-                          </tuple>
-                        </value>
-                    </item>
-                  </dictionary>
-                </state>
-              </object>
-            </value>
-        </item>
-        <item>
-            <key> <string>func_defaults</string> </key>
-            <value>
-              <none/>
-            </value>
-        </item>
         <item>
             <key> <string>id</string> </key>
             <value> <string>Base_getPreferencePathList</string> </value>
         </item>
-        <item>
-            <key> <string>warnings</string> </key>
-            <value>
-              <tuple/>
-            </value>
-        </item>
       </dictionary>
     </pickle>
   </record>
diff --git a/bt5/erp5_web_ung_theme/bt/revision b/bt5/erp5_web_ung_theme/bt/revision
index 05b9b66ffd..5755659621 100644
--- a/bt5/erp5_web_ung_theme/bt/revision
+++ b/bt5/erp5_web_ung_theme/bt/revision
@@ -1 +1 @@
-162
\ No newline at end of file
+163
\ No newline at end of file
-- 
2.30.9