From 3f5cde9a2d537a7406da529704c90f6285380022 Mon Sep 17 00:00:00 2001
From: Rafael Monnerat <rafael@nexedi.com>
Date: Tue, 22 Mar 2011 21:02:42 +0000
Subject: [PATCH] Do not disable any preference and publish gadgets.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44521 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 ...sinessConfiguration_afterConfiguration.xml | 22 ++++---------------
 bt5/erp5_configurator_standard/bt/revision    |  2 +-
 2 files changed, 5 insertions(+), 19 deletions(-)

diff --git a/bt5/erp5_configurator_standard/SkinTemplateItem/portal_skins/erp5_configurator_standard/BusinessConfiguration_afterConfiguration.xml b/bt5/erp5_configurator_standard/SkinTemplateItem/portal_skins/erp5_configurator_standard/BusinessConfiguration_afterConfiguration.xml
index d5d8aa1a53..75674cba08 100644
--- a/bt5/erp5_configurator_standard/SkinTemplateItem/portal_skins/erp5_configurator_standard/BusinessConfiguration_afterConfiguration.xml
+++ b/bt5/erp5_configurator_standard/SkinTemplateItem/portal_skins/erp5_configurator_standard/BusinessConfiguration_afterConfiguration.xml
@@ -60,21 +60,6 @@ business_template = context.getSpecialiseValue()\n
 N_ = context.Base_translateString\n
 isTransitionPossible = portal.portal_workflow.isTransitionPossible\n
 \n
-# disable the default preference that comes with erp5_core\n
-# all needed preferences are configured by Configurator\n
-# disable the default configurator system preference \n
-# that comes when instance is delivered\n
-# XXX Rafael: Is this still TRUE? it is not safe (or good)\n
-# disable people preferences after setted.\n
-preference_to_disable_list = [\'default_site_preference\', \n
-                              \'default_initial_configurator_system_preference\']\n
-\n
-for preference_to_disable in preference_to_disable_list:\n
-  preference = getattr(portal_preferences, preference_to_disable, None)\n
-  if preference is not None:\n
-    if isTransitionPossible(preference, \'disable\'):\n
-      preference.disable()\n
-\n
 if business_template is not None:\n
   # update role settings for modules which exists already\n
   for portal_type in business_template.getTemplatePortalTypeRolesList():\n
@@ -133,9 +118,10 @@ if business_template is not None:\n
             assignment.updateLocalRolesOnSecurityGroups()\n
             print "\\tOpen (assignment): ", assignment.getRelativeUrl()\n
 \n
-  # XXX: We do not care about gadgets now\n
-  # This should be a Configurator Item Instead.\n
-  #portal.ERP5Site_setupGadget()\n
+  for gadget in context.portal_gadgets.objectValues():\n
+    if gadget.getValidationState() == \'invisible\':\n
+      gadget.visible()\n
+      gadget.public()\n
 \n
 # update security settings for default preference # XXX why ???\n
 default_configurator_preference = getattr(portal_preferences,\n
diff --git a/bt5/erp5_configurator_standard/bt/revision b/bt5/erp5_configurator_standard/bt/revision
index 72b67e0ede..55b22b1aa9 100644
--- a/bt5/erp5_configurator_standard/bt/revision
+++ b/bt5/erp5_configurator_standard/bt/revision
@@ -1 +1 @@
-579
\ No newline at end of file
+580
\ No newline at end of file
-- 
2.30.9