Skip to content

Commit ddba990

Browse files
authored
Merge pull request #2733 from TechnologyEnhancedLearning/Develop/Fixes/TD-4207-Clickingbrowserbackbuttonafterdeletingthe'DelegateGroup'showingconsole'404'errorinsteadof'410'error
TD-4207 Clicking browser back button after deleting the 'Delegate Group' showing console '404' error instead of '410' error
2 parents 7e0584f + 7a7f300 commit ddba990

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

DigitalLearningSolutions.Web/ServiceFilter/VerifyAdminUserCanAccessGroup.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ public void OnActionExecuting(ActionExecutingContext context)
2626
var groupId = int.Parse(context.RouteData.Values["groupId"].ToString()!);
2727
var groupCentreId = groupsService.GetGroupCentreId(groupId);
2828

29-
if (controller.User.GetCentreIdKnownNotNull() != groupCentreId)
29+
if (groupCentreId == 0)
30+
{
31+
context.Result = new RedirectToActionResult("StatusCode", "LearningSolutions", new { code = 410 });
32+
}
33+
else if (controller.User.GetCentreIdKnownNotNull() != groupCentreId)
3034
{
3135
context.Result = new NotFoundResult();
3236
}

0 commit comments

Comments
 (0)