Commit 27f2147f authored by Jérome Perrin's avatar Jérome Perrin

remove assignRoleToSecurityGroupOnParent, if assignRoleToSecurityGroup use a

good security declaration, this is not needed.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9134 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 08714f86
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value><string>state_change[\'object\'].assignRoleToSecurityGroupOnParent()\n
<value><string>state_change[\'object\'].aq_inner.aq_parent.assignRoleToSecurityGroup()\n
</string> </value>
</item>
<item>
......
......@@ -26,11 +26,8 @@
##############################################################################
from AccessControl import ClassSecurityInfo
from Acquisition import aq_parent
from Acquisition import aq_inner
from Products.CMFCore.utils import getToolByName
from Products.CMFCore.WorkflowCore import WorkflowMethod
from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface
from Products.ERP5Type.XMLObject import XMLObject
......@@ -52,13 +49,3 @@ class RoleDefinition(XMLObject):
, PropertySheet.DublinCore
, PropertySheet.RoleDefinition
)
security.declareProtected(Permissions.ModifyPortalContent,
'assignRoleToSecurityGroupOnParent')
def assignRoleToSecurityGroupOnParent(self, **kw):
"""Assign roles to security group on the parent.
We redefine this method here, because we want the security check to be
performed on the role definition object itself, and not the parent. """
aq_parent(aq_inner(self)).assignRoleToSecurityGroup(**kw)
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