mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
fix assignvm template permission check (#8886)
This commit is contained in:
parent
ded7b4dbe5
commit
083ac069ca
@ -7223,10 +7223,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir
|
||||
if (template == null) {
|
||||
throw new InvalidParameterValueException(String.format("Template for VM: %s cannot be found", vm.getUuid()));
|
||||
}
|
||||
if (!template.isPublicTemplate()) {
|
||||
Account templateOwner = _accountMgr.getAccount(template.getAccountId());
|
||||
_accountMgr.checkAccess(newAccount, null, true, templateOwner);
|
||||
}
|
||||
_accountMgr.checkAccess(newAccount, AccessType.UseEntry, true, template);
|
||||
|
||||
// VV 5: check the new account can create vm in the domain
|
||||
DomainVO domain = _domainDao.findById(cmd.getDomainId());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user