Ensure only people allowed to see the poll can actually vote (#10161)

th-downstream
ThibG 6 years ago committed by Eugen Rochko
parent 1cba6f9790
commit 7e84e1a956

@ -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

Loading…
Cancel
Save