mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-27 15:07:03 +01:00
Return cloned system identies from the cache
This commit is contained in:
@@ -71,7 +71,7 @@ namespace Tgstation.Server.Host.Security
|
||||
throw new ArgumentNullException(nameof(user));
|
||||
lock (cachedIdentities)
|
||||
if (cachedIdentities.TryGetValue(user.Id, out var identity))
|
||||
return identity.SystemIdentity;
|
||||
return identity.SystemIdentity.Clone();
|
||||
throw new InvalidOperationException("Cached system identity has expired!");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user