public ActionResult Comparison(string guid, int documentOneIndex, int documentTwoIndex)
        {
            var solrQueryResponse = SolrResponseStorageService.GetSolrQueryResponseFromStorage(guid);
            var comparisonModel   = new ExplainComparisonViewModel(solrQueryResponse, documentOneIndex, documentTwoIndex);

            return(View("comparison", comparisonModel));
        }
        public ActionResult Explain(string guid)
        {
            var responseRecord = SolrResponseStorageService.GetSolrQueryResponseRecord(guid);

            // Authorization
            var authorizationResult = AuthorizationService.AuthorizeAsync(User, responseRecord, Operations.Read).Result;

            if (!authorizationResult.Succeeded && User.Identity.IsAuthenticated)
            {
                // The user is already authenticated and they don't have access to this page, so return ForbidResult
                return(new ForbidResult());
            }
            else if (!authorizationResult.Succeeded)
            {
                // The user is not authenticated, so ask them to authenticate as they may have access to this page once they do
                return(new ChallengeResult());
            }

            var solrQueryResponse = SolrResponseStorageService.GetSolrQueryResponseFromStorage(guid);
            var model             = new ExplainViewModel(guid, solrQueryResponse);

            return(View("Explain", model));
        }