Closed rono1 closed 5 years ago
Upon further playing, I found a way to override it even though it's not virtual. Just use the new modifier as in the code below:
[HttpGet]
public new JsonResult ViewReportPage(string reportPath, int? page = 0)
{
var model = GetReportViewerModel(Request);
foreach (var item in model.Parameters)
{
//handle parameter validation here
}
return base.ViewReportPage(reportPath, page);
}
I am looking for a way to make sure that the parameters submitted for a report are valid for the current user. I determined that I could do this if could override the ViewReportPage method in ReportController, but I currently can't. Could you update that to be virtual so I can override it? But if there's a better way to do parameter validation, then I'd be glad to hear that.