bug 13295: apply specific security check for the network

status 13295: resolved fixed

Reviewed-by: Will Chan
This commit is contained in:
Alena Prokharchyk 2012-01-25 09:38:06 -08:00
parent e468755964
commit 88d3f1ba03
1 changed files with 1 additions and 1 deletions

View File

@ -318,7 +318,7 @@ public class AccountManagerImpl implements AccountManager, AccountService, Manag
Account account = ApiDBUtils.findAccountById(entity.getAccountId());
domainId = account != null ? account.getDomainId() : -1 ;
}
if (entity.getAccountId() != -1 && domainId != -1 && !(entity instanceof VirtualMachineTemplate)) {
if (entity.getAccountId() != -1 && domainId != -1 && !(entity instanceof VirtualMachineTemplate) && !(accessType != null && accessType == AccessType.UseNetwork)) {
List<ControlledEntity> toBeChecked = domains.get(entity.getDomainId());
//for templates, we don't have to do cross domains check
if (toBeChecked == null) {