Skip to content

Commit 35bdca7

Browse files
ClearlyClairehiyuki2578
authored andcommitted
Ensure only people allowed to see the poll can actually vote (mastodon#10161)
1 parent b25b815 commit 35bdca7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/policies/poll_policy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
class PollPolicy < ApplicationPolicy
44
def vote?
5-
!current_account.blocking?(record.account) && !record.account.blocking?(current_account)
5+
StatusPolicy.new(current_account, record.status).show? && !current_account.blocking?(record.account) && !record.account.blocking?(current_account)
66
end
77
end

0 commit comments

Comments
 (0)