@JsonView(AllViews.UIVulnSearch.class) @RequestMapping(value = "/addBatchVulnTagging", method = RequestMethod.POST) public Object addBatchTagging( @PathVariable("orgId") Integer orgId, @PathVariable("appId") Integer appId, @ModelAttribute VulnerabilityCollectionModel vulnerabilityCollectionModel, Model model) throws IOException { if (!PermissionUtils.isAuthorized(Permission.CAN_MODIFY_VULNERABILITIES, orgId, appId)) { return RestResponse.failure("You are not authorized to modify vulnerabilities."); } if (!checkCollectionModel(vulnerabilityCollectionModel, model)) { return RestResponse.failure("Couldn't complete bulk vulnerability operation."); } log.info( "About to tag to " + vulnerabilityCollectionModel.getVulnerabilityIds().size() + " Vulnerabilities."); vulnerabilityService.batchTagging( vulnerabilityCollectionModel.getVulnerabilityIds(), vulnerabilityCollectionModel.getTags()); return RestResponse.success(vulnerabilityCollectionModel.getTags()); }