[Erp5-report] r12942 - /erp5/trunk/products/ERP5Form/SelectionTool.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Feb 21 18:50:39 CET 2007


Author: romain
Date: Wed Feb 21 18:50:37 2007
New Revision: 12942

URL: http://svn.erp5.org?rev=12942&view=rev
Log:
Declare dynamic viewSearchRelatedDocumentDialog methods as public.

Modified:
    erp5/trunk/products/ERP5Form/SelectionTool.py

Modified: erp5/trunk/products/ERP5Form/SelectionTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/SelectionTool.py?rev=12942&r1=12941&r2=12942&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/SelectionTool.py (original)
+++ erp5/trunk/products/ERP5Form/SelectionTool.py Wed Feb 21 18:50:37 2007
@@ -1177,8 +1177,8 @@
               """
                 viewSearchRelatedDocumentDialog Wrapper
               """
-              LOG('SelectionTool.viewSearchRelatedDocumentDialogWrapper, kw',
-                  0, kw)
+#               LOG('SelectionTool.viewSearchRelatedDocumentDialogWrapper, kw',
+#                   0, kw)
               return self.viewSearchRelatedDocumentDialog(
                                    method_count, form_id,
                                    REQUEST=REQUEST, sub_index=sub_index, **kw)
@@ -1186,13 +1186,10 @@
                     viewSearchRelatedDocumentDialogWrapper)
 
             klass = aq_base(self).__class__
-            if hasattr(klass, 'security'):
-              from Products.ERP5Type import Permissions as ERP5Permissions
-              klass.security.declareProtected(ERP5Permissions.View, name)
-            else:
-              # XXX security declaration always failed....
-              LOG('WARNING ERP5Form SelectionTool, security not defined on',
-                  0, klass.__name__)
+            security_property_id = '%s__roles__' % (name, )
+            # Declare method as public
+            setattr(klass, security_property_id, None)
+
             return getattr(self, name)
         else:
           return aq_base_name




More information about the Erp5-report mailing list