Commit 4f47d93d authored by Jérome Perrin's avatar Jérome Perrin

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.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18688 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 754722f5
......@@ -707,11 +707,15 @@ def initializePortalTypeDynamicWorkflowMethods(self, klass, ptype, prop_holder):
'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,
ActiveObject,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment