From 6e9ce9c3fb8fe7ec3c226fdce280c14b7b517538 Mon Sep 17 00:00:00 2001 From: James Gunn Date: Fri, 8 Dec 2023 16:13:25 +0000 Subject: [PATCH] Fix sign out when user has no roles (#964) --- .../Infrastructure/Filters/CheckUserExistsFilter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Infrastructure/Filters/CheckUserExistsFilter.cs b/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Infrastructure/Filters/CheckUserExistsFilter.cs index 46e3d0c60..d0692fd3d 100644 --- a/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Infrastructure/Filters/CheckUserExistsFilter.cs +++ b/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Infrastructure/Filters/CheckUserExistsFilter.cs @@ -11,7 +11,7 @@ public async Task OnResourceExecutionAsync(ResourceExecutingContext context, Res { var user = context.HttpContext.User; - if (user.Identity?.IsAuthenticated == true && !user.IsActiveTrsUser()) + if (user.Identity?.IsAuthenticated == true && !user.IsActiveTrsUser() && context.HttpContext.Request.Path != "/sign-out") { var viewResult = new ViewResult() {