mirror of
https://github.com/discourse/discourse.git
synced 2026-08-09 12:38:21 -05:00
Poll Plugin: Don't allow voting on closed topics.
This commit is contained in:
@@ -124,6 +124,8 @@ module ::PollPlugin
|
||||
end
|
||||
|
||||
def set_vote!(user, option)
|
||||
return if @post.topic.closed?
|
||||
|
||||
# Get the user's current vote.
|
||||
vote = get_vote(user)
|
||||
vote = nil unless details.keys.include? vote
|
||||
|
||||
Reference in New Issue
Block a user