Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable resetting application context user to null #4415

Merged
merged 10 commits into from
Dec 30, 2024
3 changes: 2 additions & 1 deletion Source/Csla/Server/DataPortal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//-----------------------------------------------------------------------

using System.Diagnostics.CodeAnalysis;
using System.Security.Claims;
using System.Security.Principal;
using Csla.Configuration;
using Csla.Properties;
Expand Down Expand Up @@ -774,7 +775,7 @@ private void ClearContext(DataPortalContext context)
if (!context.IsRemotePortal) return;
_applicationContext.Clear();
if (SecurityOptions.FlowSecurityPrincipalFromClient)
_applicationContext.User = null;
_applicationContext.User = new ClaimsPrincipal(new ClaimsIdentity());
rockfordlhotka marked this conversation as resolved.
Show resolved Hide resolved
}

#endregion
Expand Down