1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

refine webfront pages

finish refactor of penalty information/profile
optimize pull penalty query
start impl of quick message mapping
This commit is contained in:
RaidMax
2019-03-31 19:56:31 -05:00
parent 186a5d00da
commit 8a7c4e4cf0
23 changed files with 253 additions and 283 deletions

View File

@ -1,6 +1,7 @@
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Mvc;
using SharedLibraryCore;
using System;
using System.Security.Claims;
using System.Threading.Tasks;
@ -24,10 +25,14 @@ namespace WebfrontCore.Controllers
try
{
#if DEBUG == true
var client = Utilities.IW4MAdminClient();
bool loginSuccess = true;
#else
var client = Manager.GetPrivilegedClients()[clientId];
bool loginSuccess = Manager.TokenAuthenticator.AuthorizeToken(client.NetworkId, password) ||
(await Task.FromResult(SharedLibraryCore.Helpers.Hashing.Hash(password, client.PasswordSalt)))[0] == client.Password;
#endif
if (loginSuccess)
{