mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
CLOUDSTACK-5244 Fixed issue with applying acl items of acl to private gateway
This commit is contained in:
parent
e02682327d
commit
27ee78fe0a
@ -81,6 +81,8 @@ public class NetworkACLManagerImpl extends ManagerBase implements NetworkACLMana
|
||||
ConfigurationManager _configMgr;
|
||||
@Inject
|
||||
EntityManager _entityMgr;
|
||||
@Inject
|
||||
VpcService _vpcSvc;
|
||||
|
||||
@Override
|
||||
public NetworkACL createNetworkACL(String name, String description, long vpcId) {
|
||||
@ -105,7 +107,8 @@ public class NetworkACLManagerImpl extends ManagerBase implements NetworkACLMana
|
||||
|
||||
List<VpcGatewayVO> vpcGateways = _vpcGatewayDao.listByAclIdAndType(aclId, VpcGateway.Type.Private);
|
||||
for (VpcGatewayVO vpcGateway : vpcGateways) {
|
||||
PrivateGateway privateGateway = _entityMgr.findById(PrivateGateway.class, vpcGateway.getId());
|
||||
PrivateGateway privateGateway = _vpcSvc.getVpcPrivateGateway(vpcGateway.getId());
|
||||
|
||||
if (!applyACLToPrivateGw(privateGateway)) {
|
||||
aclApplyStatus = false;
|
||||
s_logger.debug("failed to apply network acl item on private gateway " + privateGateway.getId() + "acl id " + aclId);
|
||||
|
||||
@ -91,6 +91,8 @@ public class NetworkACLServiceImpl extends ManagerBase implements NetworkACLServ
|
||||
EntityManager _entityMgr;
|
||||
@Inject
|
||||
VpcDao _vpcDao;
|
||||
@Inject
|
||||
VpcService _vpcSvc;
|
||||
|
||||
@Override
|
||||
public NetworkACL createNetworkACL(String name, String description, long vpcId) {
|
||||
@ -239,7 +241,7 @@ public class NetworkACLServiceImpl extends ManagerBase implements NetworkACLServ
|
||||
}
|
||||
}
|
||||
|
||||
PrivateGateway privateGateway = _entityMgr.findById(PrivateGateway.class, privateGatewayId);
|
||||
PrivateGateway privateGateway = _vpcSvc.getVpcPrivateGateway(gateway.getId());
|
||||
_accountMgr.checkAccess(caller, null, true, privateGateway);
|
||||
|
||||
return _networkAclMgr.replaceNetworkACLForPrivateGw(acl, privateGateway);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user