public IActionResult RemoveAuthorizedUser(RemoveAuthorizedUserRequest command) { _groupUserService.RemoveAuthorizedUserFromAssociatedGroups(); _userService.RemoveAuthorizedUser(); return(NoContent()); }
public void OnActionExecuting(ActionExecutingContext context) { foreach (var argument in context.ActionArguments.Values.Where(v => v is RemoveAuthorizedUserRequest)) { RemoveAuthorizedUserRequest command = argument as RemoveAuthorizedUserRequest; _userValidationService.RequireValidPasswordForAuthorizedUser(command.Password); } }