mirror of https://github.com/apache/cloudstack.git
Bug 13314 - acton-bet3:vmware/xen:fail to attach "VMware Tools Installer ISO" to instance
Changes: - 'sameOwner' check cannot be used for ISO's - So need to make two access checks: See if caller has access to VM and ISO and also check if the VM's owner has access to the ISO.
This commit is contained in:
parent
e6f6437afa
commit
93ff791497
|
|
@ -1132,7 +1132,13 @@ public class TemplateManagerImpl implements TemplateManager, Manager, TemplateSe
|
|||
}
|
||||
|
||||
//check permissions
|
||||
_accountMgr.checkAccess(caller, null, true, iso, vm);
|
||||
//check if caller has access to VM and ISO
|
||||
//and also check if the VM's owner has access to the ISO.
|
||||
|
||||
_accountMgr.checkAccess(caller, null, false, iso, vm);
|
||||
|
||||
Account vmOwner = _accountDao.findById(vm.getAccountId());
|
||||
_accountMgr.checkAccess(vmOwner, null, false, iso, vm);
|
||||
|
||||
State vmState = vm.getState();
|
||||
if (vmState != State.Running && vmState != State.Stopped) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue