[Erp5-report] r10341 - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: SkinTemplateItem/p...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Sep 27 10:33:07 CEST 2006


Author: romain
Date: Wed Sep 27 10:33:04 2006
New Revision: 10341

URL: http://svn.erp5.org?rev=10341&view=rev
Log:
Only display modules if the user has the View permission.

Modified:
    erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_getModuleItemList.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_getModuleItemList.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_getModuleItemList.xml?rev=10341&r1=10340&r2=10341&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_getModuleItemList.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_getModuleItemList.xml Wed Sep 27 10:33:04 2006
@@ -71,7 +71,7 @@
             <value> <string>from Products.ERP5Type.Cache import CachingMethod, clearCache\n
 from ZODB.POSException import ConflictError\n
 \n
-user = context.portal_membership.getAuthenticatedMember().getUserName()\n
+user = context.portal_membership.getAuthenticatedMember()\n
 \n
 portal = context.getPortalObject()\n
 \n
@@ -82,10 +82,11 @@
     for module_id in portal.objectIds(\'ERP5 Folder\'):\n
       try:\n
         module = portal[module_id]\n
-        url = module.getPath()\n
-        label = module.getTitleOrId()\n
-        label = gettext(label)\n
-        item_list.append((label, url))\n
+        if user.has_permission(\'View\', module):\n
+          url = module.getPath()\n
+          label = module.getTitleOrId()\n
+          label = gettext(label)\n
+          item_list.append((label, url))\n
       except ConflictError : raise\n
       except: pass\n
   except ConflictError : raise\n

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision?rev=10341&r1=10340&r2=10341&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision Wed Sep 27 10:33:04 2006
@@ -1,1 +1,1 @@
-77
+80




More information about the Erp5-report mailing list