Allow admins to run instances in any cloud region.
Relates to
@@ -371,14 +371,17 @@ public class PipelineRunManager {
private void validateCloudRegion(final PipelineConfiguration toolConfiguration,
final AbstractCloudRegion region) {
+ if (!permissionHelper.isAdmin()) {
if (toolConfiguration.getCloudRegionId() != null) {
Assert.isTrue(toolConfiguration.getCloudRegionId().equals(region.getId()),
messageHelper.getMessage(MessageConstants.ERROR_TOOL_CLOUD_REGION_NOT_ALLOWED,
- cloudRegionManager.load(toolConfiguration.getCloudRegionId()).getName(), region.getName()));
+ cloudRegionManager.load(toolConfiguration.getCloudRegionId()).getName(),
+ region.getName()));
}
Assert.isTrue(permissionHelper.isAllowed("READ", region),
messageHelper.getMessage(MessageConstants.ERROR_RUN_CLOUD_REGION_NOT_ALLOWED, region.getName()));
}
+ }
private void validateInstanceAndPriceTypes(final PipelineConfiguration configuration,
final Pipeline pipeline,
