Only allow a single approved IP address

This commit is contained in:
jvyden 2022-06-11 18:43:30 -04:00
parent f169236613
commit eb21c7042f
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278
16 changed files with 124 additions and 141 deletions

View file

@ -82,7 +82,7 @@ public class LoginController : ControllerBase
if (ServerConfiguration.Instance.Authentication.UseExternalAuth)
{
if (this.database.UserApprovedIpAddresses.Where(a => a.UserId == user.UserId).Select(a => a.IpAddress).Contains(ipAddress))
if (user.ApprovedIPAddress == ipAddress)
{
token.Approved = true;
}