SPM and skill is rounded in profile now
fixed web console not waiting for reponse fixed password not saving over time web users level update properly now when promoted/demoted
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Security.Claims;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Filters;
|
||||
|
||||
@ -47,12 +48,25 @@ namespace WebfrontCore.Controllers
|
||||
Client.ClientId = Convert.ToInt32(base.User.Claims.First(c => c.Type == ClaimTypes.Sid).Value);
|
||||
Client.Level = (Player.Permission)Enum.Parse(typeof(Player.Permission), User.Claims.First(c => c.Type == ClaimTypes.Role).Value);
|
||||
Client.CurrentAlias = new EFAlias() { Name = User.Claims.First(c => c.Type == ClaimTypes.NameIdentifier).Value };
|
||||
var stillExists = Manager.GetPrivilegedClients()[Client.ClientId];
|
||||
|
||||
// this happens if their level has been updated
|
||||
if (stillExists.Level != Client.Level)
|
||||
{
|
||||
Client.Level = stillExists.Level;
|
||||
}
|
||||
}
|
||||
|
||||
catch (InvalidOperationException)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
catch (System.Collections.Generic.KeyNotFoundException)
|
||||
{
|
||||
// force the "banned" client to be signed out
|
||||
HttpContext.SignOutAsync().Wait();
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
|
@ -48,6 +48,7 @@ namespace WebfrontCore.Controllers
|
||||
|
||||
Manager.GetEventHandler().AddEvent(remoteEvent);
|
||||
// wait for the event to process
|
||||
|
||||
await Task.Run(() => remoteEvent.OnProcessed.Wait());
|
||||
var response = server.CommandResult.Where(c => c.ClientId == client.ClientId).ToList();
|
||||
|
||||
|
Reference in New Issue
Block a user