Closed ashanhol closed 7 years ago
// Check if user.isBanned
var user = await _userManager.FindByNameAsync(model.Username);
if (user.IsBanned)
{
return View("UserBannedNotification");
}
// If not, attempt to sign in with form credientials
Continue discussion in Issue #312
Client.Caller is not recieving "targetUser is banned" notification. Command works correctly (changes the DB) but inconsistent (sometimes takes 1-2 commands to ban targetUser)
Implemented a IsBanned Cookie Claim in startup.cs but not sure if we should include.
Client.Caller now receives correct notification as well as others in the room. Command works consistent. Decided not to implement IsBannedVerification Cookie claim since disconnecting the Target Client Connection will cause signout (unvalidates their cookie).
AccountController now checks if the user.IsBanned before attempting to login with credentials. If the user.IsBanned = true, View("UserBannedNotification") is returned.