This website works better with JavaScript.
Home
Explore
Help
Sign In
closed-social
/
mastodon
Watch
3
Star
0
Fork
2
Code
Issues
5
Pull Requests
0
Projects
0
Releases
3
Wiki
Activity
Browse Source
Ensure only people allowed to see the poll can actually vote (
#10161
)
pull/4/head
ThibG
5 years ago
committed by
Eugen Rochko
parent
f2a1b8b96b
commit
7a25bb858a
1 changed files
with
1 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
app/policies/poll_policy.rb
+ 1
- 1
app/policies/poll_policy.rb
View File
@ -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
Write
Preview
Loading…
Cancel
Save