FEATURE: remove user option for edit history public

Users can no longer opt-in for "public" edit history
if site owner disables it.

This feature adds cost and complexity to post rendering since
user options need to be premeptively loaded for every user in the
stream. It is also confusing to explain to communities with private edit
history.
This commit is contained in:
Sam Saffron
2016-07-16 21:30:00 +10:00
parent 9893953f62
commit 46b34e3c62
58 changed files with 12 additions and 82 deletions

View File

@ -574,12 +574,6 @@ describe Guardian do
it 'is true when logged in' do
expect(Guardian.new(Fabricate(:user)).can_see?(post_revision)).to be_truthy
end
it 'is true if the author has public edit history' do
public_post_revision = Fabricate(:post_revision)
public_post_revision.post.user.user_option.edit_history_public = true
expect(Guardian.new.can_see?(public_post_revision)).to be_truthy
end
end
context 'edit_history_visible_to_public is false' do
@ -597,12 +591,6 @@ describe Guardian do
it 'is false for trust level lower than 4' do
expect(Guardian.new(trust_level_3).can_see?(post_revision)).to be_falsey
end
it 'is true if the author has public edit history' do
public_post_revision = Fabricate(:post_revision)
public_post_revision.post.user.user_option.edit_history_public = true
expect(Guardian.new.can_see?(public_post_revision)).to be_truthy
end
end
end
end