Commit 977414cd authored by Gabriel Monnerat's avatar Gabriel Monnerat Committed by Jérome Perrin

component: fix security declaration of checkConsistency

We don't need Permissions.ModifyPortalContent, Permissions.AccessContentsInformation
is enough. This is consistent with the security declarations in Base and
Folder.

https://lab.nexedi.com/nexedi/erp5/blob/08be2f8cc936fbdc3d5bafb4355c3a475198abc1/product/ERP5Type/Base.py#L2632

https://lab.nexedi.com/nexedi/erp5/blob/08be2f8cc936fbdc3d5bafb4355c3a475198abc1/product/ERP5Type/Core/Folder.py#L1434
parent 4eb26017
...@@ -225,7 +225,7 @@ class ComponentMixin(PropertyRecordableMixin, Base): ...@@ -225,7 +225,7 @@ class ComponentMixin(PropertyRecordableMixin, Base):
""" """
return "text/x-python" return "text/x-python"
security.declareProtected(Permissions.ModifyPortalContent, 'checkConsistency') security.declareProtected(Permissions.AccessContentsInformation, 'checkConsistency')
def checkConsistency(self, *args, **kw): def checkConsistency(self, *args, **kw):
""" """
Check the consistency of the Component upon validate or when being Check the consistency of the Component upon validate or when being
......
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