diff --git a/app/channels/map_channel.rb b/app/channels/map_channel.rb index deb810b0..e7c10b45 100644 --- a/app/channels/map_channel.rb +++ b/app/channels/map_channel.rb @@ -2,7 +2,7 @@ class MapChannel < ApplicationCable::Channel # Called when the consumer has successfully # become a subscriber of this channel. def subscribed - # TODO: verify permission + return unless Pundit.policy(current_user, Map.find(params[:id])).show? stream_from "map_#{params[:id]}" end -end \ No newline at end of file +end