Set<Long> permissions = getPermissions(comment.getArticle().getBlog(), webUser);
if (!permissions.contains(PermissionManager.WRITE_PERMISSION)) {
throw new InputException(getLocalizedMessage("BloggingWeb", "blog.insufficientRights"));
}
Long id = comment.getArticle().getId();
blogMgr.deleteComment(comment);
LOGGER.info("User "+UserManagerBase.toString(webUser)+" deleted comment #"+comment.getId()+" ("+comment.getContent()+") of article #"+comment.getArticle().getId()+" ("+comment.getArticle().getTitle()+") of blog #"+comment.getArticle().getBlog().getId()+" ("+comment.getArticle().getBlog().getName()+")");
return injectId(mapping.findForward("deleted"), id);
}
@Override