mirror of
https://github.com/discourse/discourse.git
synced 2026-08-15 15:35:11 -05:00
Remove ancient votes code that is no longer used.
This commit is contained in:
@@ -46,10 +46,7 @@ module PostGuardian
|
||||
not(post.trashed?) &&
|
||||
|
||||
# don't like your own stuff
|
||||
not(action_key == :like && is_my_own?(post)) &&
|
||||
|
||||
# no voting more than once on single vote topics
|
||||
not(action_key == :vote && opts[:voted_in_topic] && post.topic.has_meta_data_boolean?(:single_vote))
|
||||
not(action_key == :like && is_my_own?(post))
|
||||
end
|
||||
|
||||
!!result
|
||||
@@ -75,11 +72,6 @@ module PostGuardian
|
||||
|
||||
return can_see_flags?(topic) if PostActionType.is_flag?(type_symbol)
|
||||
|
||||
if type_symbol == :vote
|
||||
# We can see votes if the topic allows for public voting
|
||||
return false if topic.has_meta_data_boolean?(:private_poll)
|
||||
end
|
||||
|
||||
true
|
||||
end
|
||||
|
||||
@@ -207,10 +199,6 @@ module PostGuardian
|
||||
can_see_post?(post)
|
||||
end
|
||||
|
||||
def can_vote?(post, opts = {})
|
||||
post_can_act?(post, :vote, opts: opts)
|
||||
end
|
||||
|
||||
def can_change_post_owner?
|
||||
is_admin?
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user