Closed mattrobineau closed 7 years ago
Instead of validating users in the story and comment validators eg:
var user = Task.Run(async () => await UserService.GetUser(instance.UserId)).Result; if (user == null) { result.IsValid = false; result.Messages.Add("Error: Please sign in again."); } if (user.IsBanned) { result.IsValid = false; result.Messages.Add("You account is banned."); return result; }
Validate the users using a user specific validator in the controller actions.
Instead of validating users in the story and comment validators eg:
Validate the users using a user specific validator in the controller actions.