mirror of
https://github.com/kikobar/mastodon.git
synced 2024-11-16 20:22:18 +00:00
Ensure only people allowed to see the poll can actually vote (#10161)
This commit is contained in:
parent
f2a1b8b96b
commit
7a25bb858a
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
class PollPolicy < ApplicationPolicy
|
class PollPolicy < ApplicationPolicy
|
||||||
def vote?
|
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
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue