mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
Add post_edit_time_limit site setting to limit the how long a post can be edited and deleted by the author. Default is 1 year.
This commit is contained in:
parent
e750ea010f
commit
259295d865
10 changed files with 118 additions and 5 deletions
|
@ -214,7 +214,7 @@ describe PostsController do
|
|||
end
|
||||
|
||||
it "raises an error when the user doesn't have permission to see the post" do
|
||||
Guardian.any_instance.expects(:can_edit?).with(post).returns(false)
|
||||
Guardian.any_instance.expects(:can_edit?).with(post).at_least_once.returns(false)
|
||||
xhr :put, :update, update_params
|
||||
response.should be_forbidden
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue