2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-05 08:59:27 +08:00

FIX: Consider oneboxes links wrt to min_trust_level_to_post_links

This commit is contained in:
Robin Ward 2018-02-08 18:26:56 -05:00
parent 69bccb9e32
commit 5466389f4e
4 changed files with 28 additions and 7 deletions

View file

@ -93,7 +93,7 @@ class Validators::PostValidator < ActiveModel::Validator
end
def can_post_links_validator(post)
return if post.link_count == 0 ||
return if (post.link_count == 0 && !post.has_oneboxes?) ||
Guardian.new(post.acting_user).can_post_link? ||
private_message?(post)