Commit 2905e7b8 authored by Łukasz Nowak's avatar Łukasz Nowak

Check caller and raise.

parent d95812b8
...@@ -64,6 +64,11 @@ def restrictMethodAsShadowUser(self, open_order=None, callable_object=None, ...@@ -64,6 +64,11 @@ def restrictMethodAsShadowUser(self, open_order=None, callable_object=None,
def SoftwareInstance_bangAsSelf(self, relative_url=None, reference=None, def SoftwareInstance_bangAsSelf(self, relative_url=None, reference=None,
comment=None): comment=None):
"""Call bang on self.""" """Call bang on self."""
# Caller check
if relative_url is None:
raise TypeError('relative_url has to be defined')
if reference is None:
raise TypeError('reference has to be defined')
# micro security: can caller access software instance? # micro security: can caller access software instance?
software_instance = self.restrictedTraverse(relative_url) software_instance = self.restrictedTraverse(relative_url)
sm = getSecurityManager() sm = getSecurityManager()
......
412 413
\ No newline at end of file \ No newline at end of file
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