Commit 1e5a44ae authored by Sebastien Robin's avatar Sebastien Robin

make getTypeBaseMethod usable from restricted python scripts

parent abaf24f4
...@@ -2885,6 +2885,10 @@ class Base( CopyContainer, ...@@ -2885,6 +2885,10 @@ class Base( CopyContainer,
""" """
return getattr(aq_base(self), 'guid', None) return getattr(aq_base(self), 'guid', None)
security.declareProtected(Permissions.AccessContentsInformation, 'getTypeBasedMethod')
def getTypeBasedMethod(self, *args, **kw):
return self._getTypeBasedMethod(*args, **kw)
# Type Casting # Type Casting
def _getTypeBasedMethod(self, method_id, fallback_script_id=None, def _getTypeBasedMethod(self, method_id, fallback_script_id=None,
script_id=None,**kw): script_id=None,**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