Commit 2f4df0d2 authored by Romain Courteaud's avatar Romain Courteaud 🐸

Computer should report error in Slave Instance.

There is no user for Slave Instances, so use super user instead.
parent a2941c55
......@@ -72,6 +72,10 @@ def SoftwareInstance_bangAsSelf(self, relative_url=None, reference=None,
# micro security: can caller access software instance?
software_instance = self.restrictedTraverse(relative_url)
sm = getSecurityManager()
if (software_instance.getPortalType() == "Slave Instance") and \
(software_instance.getReference() == reference):
# XXX There is no account for Slave Instance
reference = SUPER_USER
newSecurityManager(None, self.getPortalObject().acl_users.getUserById(
reference))
try:
......
490
\ No newline at end of file
491
\ 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