mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 04:31:10 +08:00
FIX: TL3 can convert their post to a wiki (#25023)
A bug that allowed TL1 to convert other's posts to wiki. The issue was introduced in this PR: https://github.com/discourse/discourse/pull/24999/files The wiki can be created if a user is TL3 and it is their own post - default 3 for setting `SiteSetting.min_trust_to_allow_self_wiki` In addition, a wiki can be created by staff and TL4 users for any post.
This commit is contained in:

committed by
GitHub

parent
c4f940aa31
commit
d03f6727b1
@ -3639,8 +3639,6 @@ RSpec.describe Guardian do
|
||||
describe "can_wiki?" do
|
||||
let(:post) { Fabricate(:post, created_at: 1.minute.ago) }
|
||||
|
||||
before { SiteSetting.edit_wiki_post_allowed_groups = "14" }
|
||||
|
||||
it "returns false for regular user" do
|
||||
expect(Guardian.new(coding_horror).can_wiki?(post)).to be_falsey
|
||||
end
|
||||
|
Reference in New Issue
Block a user