Skip to content

Commit

Permalink
Ensure only people allowed to see the poll can actually vote (#10161)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored and Gargron committed Mar 4, 2019
1 parent f2a1b8b commit 7a25bb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/policies/poll_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 7a25bb8

Please sign in to comment.