public ActionResult Index(RequestsFilterOptions filterOptions) { if (!_securityService.CanRead()) { return(RedirectToAction("ForbiddenError", "Home")); } ViewData["SecurityService"] = _securityService; ViewData["RequestService"] = _requestService; return(View( _requestService.GetRequestIndexModelView(filterOptions, _requestService.GetFilteredRequests(filterOptions)))); }
public ActionResult Detail(int id) { var request = _requestService.GetRequestById(id); if (!_securityService.CanRead(request)) { return(RedirectToAction("ForbiddenError", "Home")); } ViewData["SecurityService"] = _securityService; return(View(_requestService.GetRequestViewModelBy(request))); }