fix penalty list javascript loading duplicates
make bad GUID parse throw an exception so we don't have a client connect with GUID of 0 no longer print out ac debug messages fix small issue of trying to parse empty chat messages fix issue with set level on accounts with multi guid, same IP
This commit is contained in:
@ -25,14 +25,9 @@ namespace WebfrontCore.Controllers
|
||||
|
||||
try
|
||||
{
|
||||
//#if DEBUG == true
|
||||
// var client = Utilities.IW4MAdminClient();
|
||||
// bool loginSuccess = true;
|
||||
//#else
|
||||
var privilegedClient = Manager.GetPrivilegedClients()[clientId];
|
||||
var privilegedClient = Manager.PrivilegedClients[clientId];
|
||||
bool loginSuccess = Manager.TokenAuthenticator.AuthorizeToken(privilegedClient.NetworkId, password) ||
|
||||
(await Task.FromResult(SharedLibraryCore.Helpers.Hashing.Hash(password, privilegedClient.PasswordSalt)))[0] == privilegedClient.Password;
|
||||
//#endif
|
||||
|
||||
if (loginSuccess)
|
||||
{
|
||||
|
@ -71,7 +71,7 @@ namespace WebfrontCore.Controllers
|
||||
if (clientId > 0)
|
||||
{
|
||||
Client.ClientId = clientId;
|
||||
Client.NetworkId = User.Claims.First(_claim => _claim.Type == ClaimTypes.PrimarySid).Value.ConvertLong();
|
||||
Client.NetworkId = User.Claims.First(_claim => _claim.Type == ClaimTypes.PrimarySid).Value.ConvertGuidToLong();
|
||||
Client.Level = (EFClient.Permission)Enum.Parse(typeof(EFClient.Permission), User.Claims.First(c => c.Type == ClaimTypes.Role).Value);
|
||||
Client.CurrentAlias = new EFAlias() { Name = User.Claims.First(c => c.Type == ClaimTypes.NameIdentifier).Value };
|
||||
Authorized = Client.ClientId >= 0;
|
||||
|
@ -22,7 +22,7 @@ namespace WebfrontCore.Controllers
|
||||
ViewBag.Title = Localization["WEBFRONT_PENALTY_TITLE"];
|
||||
ViewBag.Keywords = "IW4MAdmin, penalties, ban, kick, warns";
|
||||
|
||||
return View((SharedLibraryCore.Objects.Penalty.PenaltyType)showOnly);
|
||||
return View(showOnly);
|
||||
}
|
||||
|
||||
public async Task<IActionResult> ListAsync(int offset = 0, PenaltyType showOnly = PenaltyType.Any)
|
||||
|
Reference in New Issue
Block a user