[Erp5-report] r12840 - /erp5/trunk/products/ERP5/ERP5Site.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Sat Feb 17 11:41:33 CET 2007
Author: bartek
Date: Sat Feb 17 11:41:18 2007
New Revision: 12840
URL: http://svn.erp5.org?rev=12840&view=rev
Log:
in module access check using MARKER causes Unauthorized - we have to use None
Modified:
erp5/trunk/products/ERP5/ERP5Site.py
Modified: erp5/trunk/products/ERP5/ERP5Site.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/ERP5Site.py?rev=12840&r1=12839&r2=12840&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/ERP5Site.py (original)
+++ erp5/trunk/products/ERP5/ERP5Site.py Sat Feb 17 11:41:18 2007
@@ -876,16 +876,16 @@
if hasattr(portal_object, module_name):
return module_name
# then look for module where the type is allowed
- module_name=MARKER
+ module_name=None
modlist=[m for m in self.objectIds() if m.endswith('module')]
for mod in modlist:
- module=self.restrictedTraverse(mod,MARKER)
- if module is MARKER: # we can't access this one
+ module=self.restrictedTraverse(mod,None)
+ if module is None: # we can't access this one
continue
if portal_type in self.portal_types[module.getPortalType()].allowed_content_types:
module_name=mod
break
- if module_name is not MARKER:
+ if module_name is not None:
return module_name
if default is not MARKER:
return default
More information about the Erp5-report
mailing list