1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-11 15:52:25 -05:00

Player search not showing duplicates anymore

removed extra information on player search
fixed kdr innaccuracy on profile page
shortened cache-length
This commit is contained in:
RaidMax
2018-02-16 22:24:03 -06:00
parent 89cfb80798
commit 0752013fdf
19 changed files with 10840 additions and 253 deletions

View File

@ -194,6 +194,25 @@ namespace SharedLibrary.Services
.ToListAsync();
}
public async Task<bool> IsAuthenticated(int clientIP)
{
using (var context = new DatabaseContext())
{
context.Configuration.LazyLoadingEnabled = false;
context.Configuration.ProxyCreationEnabled = false;
context.Configuration.AutoDetectChangesEnabled = false;
var iqMatching = from alias in context.Aliases
where alias.IPAddress == clientIP
join client in context.Clients
on alias.LinkId equals client.AliasLinkId
where client.Level > Player.Permission.Trusted
select client;
return (await iqMatching.CountAsync()) > 0;
}
}
public async Task<IList<EFClient>> GetPrivilegedClients()
{
using (var context = new DatabaseContext())
@ -228,6 +247,7 @@ namespace SharedLibrary.Services
.AsNoTracking()
on alias.LinkId equals client.AliasLinkId
select client)
.Distinct()
.Include(c => c.CurrentAlias)
.Include(c => c.AliasLink.Children);