mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
keep track of the user who revised a post
This commit is contained in:
parent
3992aa971d
commit
f8e2ecfa94
2 changed files with 6 additions and 0 deletions
|
@ -12,6 +12,7 @@ class PostRevisor
|
||||||
return false if not should_revise?
|
return false if not should_revise?
|
||||||
|
|
||||||
@post.acting_user = @user
|
@post.acting_user = @user
|
||||||
|
@post.updated_by = @user
|
||||||
revise_post
|
revise_post
|
||||||
update_category_description
|
update_category_description
|
||||||
post_process_post
|
post_process_post
|
||||||
|
|
|
@ -197,6 +197,11 @@ describe PostRevisor do
|
||||||
it "allows an admin to insert images into a new user's post" do
|
it "allows an admin to insert images into a new user's post" do
|
||||||
post.errors.should be_blank
|
post.errors.should be_blank
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "marks the admin as the last updater" do
|
||||||
|
post.updated_by.should == changed_by
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "new user editing their own post" do
|
describe "new user editing their own post" do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue