mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 14:03:22 +08:00
FIX: Respect the acting_user
attribute on the PostValidator
This commit is contained in:
parent
64094954bc
commit
960620d91b
|
@ -82,6 +82,7 @@ class NewPostManager
|
|||
|
||||
validator = Validators::PostValidator.new
|
||||
post = Post.new(raw: manager.args[:raw])
|
||||
post.user = manager.user
|
||||
validator.validate(post)
|
||||
if post.errors[:raw].present?
|
||||
result = NewPostResult.new(:created_post, false)
|
||||
|
|
Loading…
Reference in New Issue
Block a user