You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 11ea13f
Browse filesBrowse the repository at this point in the historyBrowse files
abhishek
committed
Added the domain checker code and checks for a host of commands. This replaces the previous mechanism, and provides a way for us to validate the command executor as to whether he has access to the zone.
//this is for account specific case, as domainId != null
1399
-
thrownewPermissionDeniedException("The account associated with specific domain id:"+domainId+" doesn't have permissions to add vlan ip ranges for the zone:"+zone.getId());
1400
-
}
1400
+
// //check if the account's domain is a child of the zone's domain, for adding vlan ip ranges
// //this is for account specific case, as domainId != null
1403
+
// throw new PermissionDeniedException("The account associated with specific domain id:"+domainId+" doesn't have permissions to add vlan ip ranges for the zone:"+zone.getId());
1404
+
// }
1405
+
//ACL check
1406
+
checkAccess(account, zone);
1401
1407
1402
1408
booleanassociateIpRangeToAccount = false;
1403
1409
if (vlanType.equals(VlanType.VirtualNetwork)) {
@@ -2215,4 +2221,21 @@ public boolean deleteVlanIpRange(DeleteVlanIpRangeCmd cmd) throws InvalidParamet
//may need to revisit domain admin case for leaves
1163
-
thrownewPermissionDeniedException("Failed to deploy VM, user does not have permission to deploy a vm within this dedicated private zone under domain id:"+domainId);
1164
-
}
1165
-
}
1166
-
}
1167
-
}
1168
1156
}
1157
+
1158
+
if(domainId == null){
1159
+
//do nothing (public zone case)
1160
+
}
1161
+
else{
1162
+
if(userAccount != null){
1163
+
_configMgr.checkAccess(userAccount, dc);//user deploying his own vm
0 commit comments