From 4393e59415a6a4662ab368c50bff4c6e7218f55f Mon Sep 17 00:00:00 2001 From: Arunima George Date: Fri, 8 Nov 2024 09:19:31 +0000 Subject: [PATCH] TD-4870: Timeout page not showing properly in search page. --- LearningHub.Nhs.WebUI/Controllers/SearchController.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/LearningHub.Nhs.WebUI/Controllers/SearchController.cs b/LearningHub.Nhs.WebUI/Controllers/SearchController.cs index ac314f6c9..4f4e07e62 100644 --- a/LearningHub.Nhs.WebUI/Controllers/SearchController.cs +++ b/LearningHub.Nhs.WebUI/Controllers/SearchController.cs @@ -306,6 +306,11 @@ public async Task Image(string name) public async Task GetAutoSuggestion(string term) { var autoSuggestions = await this.searchService.GetAutoSuggestionList(term); + if (!this.User.Identity.IsAuthenticated) + { + return this.RedirectToAction("AccessDenied", "Home"); + } + return this.PartialView("_AutoComplete", autoSuggestions); } }