verify before streaming from map channel
This commit is contained in:
parent
40488b74f2
commit
eacd9dae67
1 changed files with 2 additions and 2 deletions
|
@ -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
|
Loading…
Add table
Reference in a new issue