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:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user