From 5b39d1aa5d46e6d647633d90a0903464ce1b69cb Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Sat, 26 Apr 2025 22:54:52 -0400 Subject: [PATCH] Temporary workaround for IAuthenticationContext still being a thing --- src/Tgstation.Server.Host/Authority/UserAuthority.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Tgstation.Server.Host/Authority/UserAuthority.cs b/src/Tgstation.Server.Host/Authority/UserAuthority.cs index 5824560db6..5735d32409 100644 --- a/src/Tgstation.Server.Host/Authority/UserAuthority.cs +++ b/src/Tgstation.Server.Host/Authority/UserAuthority.cs @@ -758,10 +758,16 @@ namespace Tgstation.Server.Host.Authority InstanceManagerRights = model.PermissionSet?.InstanceManagerRights ?? InstanceManagerRights.None, }; + /* var currentUser = new User { Id = claimsPrincipalAccessor.User.GetTgsUserId(), }; + */ + + // Temporary workaround while we work to remove authentication context + var currentUser = DatabaseContext.Users.Local.First( + user => user.Id == claimsPrincipalAccessor.User.GetTgsUserId()); DatabaseContext.Users.Attach(currentUser);