Commit ecb9a677 authored by Yusei Tahara's avatar Yusei Tahara

An attribute named "MethodName__roles__" should not be acquired from parents.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25758 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9d9d0a75
...@@ -204,7 +204,7 @@ except ImportError: ...@@ -204,7 +204,7 @@ except ImportError:
class __roles__: class __roles__:
@staticmethod @staticmethod
def rolesForPermissionOn(ob): def rolesForPermissionOn(ob):
roles = getattr(ob.im_self, '%s__roles__' % ob.__name__, None) roles = getattr(aq_base(ob.im_self), '%s__roles__' % ob.__name__, None)
if roles is None: if roles is None:
return rolesForPermissionOn(None, ob.im_self, ('Manager',), return rolesForPermissionOn(None, ob.im_self, ('Manager',),
'_Modify_portal_content_Permission') '_Modify_portal_content_Permission')
...@@ -215,7 +215,7 @@ except ImportError: ...@@ -215,7 +215,7 @@ except ImportError:
class __roles__: class __roles__:
@staticmethod @staticmethod
def rolesForPermissionOn(ob): def rolesForPermissionOn(ob):
roles = getattr(ob.im_self, '%s__roles__' % ob.__name__, None) roles = getattr(aq_base(ob.im_self), '%s__roles__' % ob.__name__, None)
if roles is None: if roles is None:
return rolesForPermissionOn(None, ob.im_self, ('Manager',), return rolesForPermissionOn(None, ob.im_self, ('Manager',),
'_Access_contents_information_Permission') '_Access_contents_information_Permission')
......
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