public void OnActionExecuting(ActionExecutingContext context) { foreach (var argument in context.ActionArguments.Values.Where(v => v is GetChannelUsersRequest)) { GetChannelUsersRequest command = argument as GetChannelUsersRequest; _channelValidationService.RequireAuthorizedUserIsGroupMemberFromChannel(command.ChannelId); } }
public GetChannelUsersRequestHandler(Request request, ClientConnection clientConnection, ILoadChannelsService loadChannelsService) { this.request = (GetChannelUsersRequest)request; this.clientConnection = clientConnection; this.loadChannelsService = loadChannelsService; }
public IActionResult GetAllChannelUsers(GetChannelUsersRequest command) { var users = _channelUserService.GetAllChannelUsers(command.ChannelId, command.Username); return(Json(users)); }