mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Respect the acting_user attribute on the PostValidator
This commit is contained in:
@@ -82,6 +82,7 @@ class NewPostManager
|
|||||||
|
|
||||||
validator = Validators::PostValidator.new
|
validator = Validators::PostValidator.new
|
||||||
post = Post.new(raw: manager.args[:raw])
|
post = Post.new(raw: manager.args[:raw])
|
||||||
|
post.user = manager.user
|
||||||
validator.validate(post)
|
validator.validate(post)
|
||||||
if post.errors[:raw].present?
|
if post.errors[:raw].present?
|
||||||
result = NewPostResult.new(:created_post, false)
|
result = NewPostResult.new(:created_post, false)
|
||||||
|
|||||||
Reference in New Issue
Block a user