mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:21:18 +08:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user