about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-03-04 22:47:47 +0100
committerEugen Rochko <eugen@zeonfederated.com>2019-03-04 22:47:47 +0100
commit7a25bb858a2a7f3662d2ad2a8cba9ac7ea141aca (patch)
tree3ca90874692e240b220fe7abd85e956736c1b0c6 /app
parentf2a1b8b96b031db3a479de029a29e04e28c55352 (diff)
Ensure only people allowed to see the poll can actually vote (#10161)
Diffstat (limited to 'app')
-rw-r--r--app/policies/poll_policy.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/policies/poll_policy.rb b/app/policies/poll_policy.rb
index 0d839f240..9d69eb5bb 100644
--- a/app/policies/poll_policy.rb
+++ b/app/policies/poll_policy.rb
@@ -2,6 +2,6 @@
 
 class PollPolicy < ApplicationPolicy
   def vote?
-    !current_account.blocking?(record.account) && !record.account.blocking?(current_account)
+    StatusPolicy.new(current_account, record.status).show? && !current_account.blocking?(record.account) && !record.account.blocking?(current_account)
   end
 end