mirror of https://github.com/apache/cloudstack.git
Fixed ipAssoc and createNetworkACL (for vpc) commands - didn't work in Project scenario
Conflicts: server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java
This commit is contained in:
parent
43b406279a
commit
823f0c9669
|
|
@ -1142,7 +1142,7 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
|
||||
Network network = _networksDao.findById(networkId);
|
||||
if (network != null) {
|
||||
_accountMgr.checkAccess(caller, AccessType.UseNetwork, false, network);
|
||||
_accountMgr.checkAccess(owner, AccessType.UseNetwork, false, network);
|
||||
} else {
|
||||
s_logger.debug("Unable to find ip address by id: " + ipId);
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -137,8 +137,11 @@ public class NetworkACLManagerImpl implements Manager,NetworkACLManager{
|
|||
Vpc vpc = _vpcMgr.getVpc(network.getVpcId());
|
||||
Account aclOwner = _accountMgr.getAccount(vpc.getAccountId());
|
||||
|
||||
_accountMgr.checkAccess(caller, AccessType.UseNetwork, false, network);
|
||||
//check if the caller can access vpc
|
||||
_accountMgr.checkAccess(caller, null, false, vpc);
|
||||
|
||||
//check if the acl can be created for this network
|
||||
_accountMgr.checkAccess(aclOwner, AccessType.UseNetwork, false, network);
|
||||
|
||||
if (!_networkMgr.areServicesSupportedInNetwork(networkId, Service.NetworkACL)) {
|
||||
throw new InvalidParameterValueException("Service " + Service.NetworkACL + " is not supported in network " + network);
|
||||
|
|
|
|||
|
|
@ -1263,7 +1263,7 @@ public class ManagementServerImpl implements ManagementServer {
|
|||
boolean listAll = false;
|
||||
if (isoFilter != null && isoFilter == TemplateFilter.all) {
|
||||
if (caller.getType() == Account.ACCOUNT_TYPE_NORMAL) {
|
||||
throw new InvalidParameterValueException("Filter " + TemplateFilter.all + " can be specified by admin only", null);
|
||||
throw new InvalidParameterValueException("Filter " + TemplateFilter.all + " can be specified by admin only");
|
||||
}
|
||||
listAll = true;
|
||||
}
|
||||
|
|
@ -1292,7 +1292,7 @@ public class ManagementServerImpl implements ManagementServer {
|
|||
boolean listAll = false;
|
||||
if (templateFilter != null && templateFilter == TemplateFilter.all) {
|
||||
if (caller.getType() == Account.ACCOUNT_TYPE_NORMAL) {
|
||||
throw new InvalidParameterValueException("Filter " + TemplateFilter.all + " can be specified by admin only", null);
|
||||
throw new InvalidParameterValueException("Filter " + TemplateFilter.all + " can be specified by admin only");
|
||||
}
|
||||
listAll = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue