mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 14:07:30 +08: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