[Erp5-report] r18688 - /erp5/trunk/products/ERP5Type/Base.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Jan 14 15:16:24 CET 2008
Author: jerome
Date: Mon Jan 14 15:16:22 2008
New Revision: 18688
URL: http://svn.erp5.org?rev=18688&view=rev
Log:
When defining security for interaction workflow methods, make sure we don't
override existing security on this method.
This will stop all "WARNING SecurityInfo Conflicting security declarations for ..." messages.
Modified:
erp5/trunk/products/ERP5Type/Base.py
Modified: erp5/trunk/products/ERP5Type/Base.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Base.py?rev=18688&r1=18687&r2=18688&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Base.py (original)
+++ erp5/trunk/products/ERP5Type/Base.py Mon Jan 14 15:16:22 2008
@@ -707,10 +707,14 @@
'WARNING! Can not initialize %s on %s' % \
(method_id, str(klass)))
else:
- prop_holder.security.declareProtected(Permissions.AccessContentsInformation,
- method_id)
+ # set a default security, if this method is not already
+ # protected.
+ if method_id not in prop_holder.security.names:
+ prop_holder.security.declareProtected(
+ Permissions.AccessContentsInformation, method_id)
prop_holder.registerWorkflowMethod(method_id, wf_id, tr_id,
tdef.once_per_transaction)
+
class Base( CopyContainer,
PortalContent,
More information about the Erp5-report
mailing list