Commit ba05d728 authored by Romain Courteaud's avatar Romain Courteaud

Fixup 83e731d9.

Only shadow user is allowed to access public machine.
parent 9bb5accb
...@@ -408,12 +408,16 @@ class InstancePublisher(GenericPublisher): ...@@ -408,12 +408,16 @@ class InstancePublisher(GenericPublisher):
portal_type="Person") portal_type="Person")
else: else:
raise NotImplementedError, "Can not get Person document" raise NotImplementedError, "Can not get Person document"
result = user.Person_findPartition( result = user.Person_restrictMethodAsShadowUser(
shadow_document=user,
callable_object=user.Person_findPartition,
argument_list=[
self.jbody['software_release'], self.jbody['software_release'],
self.jbody['software_type'], self.jbody['software_type'],
('Software Instance', 'Slave Instance')[int(self.jbody['slave'])], ('Software Instance', 'Slave Instance')[int(self.jbody['slave'])],
self.jbody['sla'], self.jbody['sla']],
test_mode=True) argument_dict={
'test_mode': True})
except Exception: except Exception:
transaction.abort() transaction.abort()
LOG('SlapOSRestApiV1', ERROR, LOG('SlapOSRestApiV1', ERROR,
......
11 12
\ 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