From 823834e5c15dc400fee3a807ca9f980b47cc957a Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Sat, 21 Dec 2019 10:22:13 -0500 Subject: [PATCH] fix poll voting permissions --- lib/philomena_web/controllers/topic/poll/vote_controller.ex | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/philomena_web/controllers/topic/poll/vote_controller.ex b/lib/philomena_web/controllers/topic/poll/vote_controller.ex index c9f18d93..9151f754 100644 --- a/lib/philomena_web/controllers/topic/poll/vote_controller.ex +++ b/lib/philomena_web/controllers/topic/poll/vote_controller.ex @@ -8,7 +8,11 @@ defmodule PhilomenaWeb.Topic.Poll.VoteController do import Ecto.Query plug :verify_authorized when action in [:index, :delete] + plug PhilomenaWeb.FilterBannedUsersPlug when action in [:create] + + plug PhilomenaWeb.CanaryMapPlug, index: :show, create: :show, delete: :show plug :load_and_authorize_resource, model: Forum, id_name: "forum_id", id_field: "short_name", persisted: true + plug PhilomenaWeb.LoadTopicPlug plug PhilomenaWeb.LoadPollPlug