FEATURE: editing_grace_period_max_diff to force revisions in grace period

If a user performs a substantive edit of 20 chars or more during grace period
we will store a revision to track the change

This allows for better auditing of changes that happen during the grace period
This commit is contained in:
Sam
2018-03-07 16:44:21 +11:00
parent c6cb7f6693
commit e162cd16b6
6 changed files with 103 additions and 27 deletions

View File

@ -674,7 +674,7 @@ describe Post do
context 'second poster posts again quickly' do
it 'is a ninja edit, because the second poster posted again quickly' do
SiteSetting.expects(:editing_grace_period).returns(1.minute.to_i)
SiteSetting.editing_grace_period = 1.minute.to_i
post.revise(changed_by, { raw: 'yet another updated body' }, revised_at: post.updated_at + 10.seconds)
post.reload