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:
parent
69bccb9e32
commit
5466389f4e
4 changed files with 28 additions and 7 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue