Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
 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));
        }