mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
Fixed the issue when admin can't deploy vm in behalf of another user. We were passing caller to deployVm always.
This commit is contained in:
parent
402f275a9f
commit
7b9b897459
@ -1902,7 +1902,7 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
|
|||||||
networkList.add(defaultNetwork);
|
networkList.add(defaultNetwork);
|
||||||
}
|
}
|
||||||
|
|
||||||
return createVirtualMachine(zone, serviceOffering, template, hostName, displayName, caller, diskOfferingId,
|
return createVirtualMachine(zone, serviceOffering, template, hostName, displayName, owner, diskOfferingId,
|
||||||
diskSize, networkList, securityGroupIdList, group, userData, sshKeyPair, hypervisor, caller);
|
diskSize, networkList, securityGroupIdList, group, userData, sshKeyPair, hypervisor, caller);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2049,7 +2049,7 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return createVirtualMachine(zone, serviceOffering, template, hostName, displayName, caller, diskOfferingId,
|
return createVirtualMachine(zone, serviceOffering, template, hostName, displayName, owner, diskOfferingId,
|
||||||
diskSize, networkList, null, group, userData, sshKeyPair, hypervisor, caller);
|
diskSize, networkList, null, group, userData, sshKeyPair, hypervisor, caller);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2069,7 +2069,7 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
|
|||||||
throw new CloudRuntimeException("Unable to find the domain " + zone.getDomainId() + " for the zone: " + zone);
|
throw new CloudRuntimeException("Unable to find the domain " + zone.getDomainId() + " for the zone: " + zone);
|
||||||
}
|
}
|
||||||
_accountMgr.checkAccess(caller, domain);
|
_accountMgr.checkAccess(caller, domain);
|
||||||
_accountMgr.checkAccess(owner, domain);
|
_accountMgr.checkAccess(caller, domain);
|
||||||
}
|
}
|
||||||
|
|
||||||
//check if account/domain is with in resource limits to create a new vm
|
//check if account/domain is with in resource limits to create a new vm
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user