mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 11:54:41 +08:00
security fix, anon should not be treated as though they can create anything
This commit is contained in:
@ -67,14 +67,15 @@ describe Category do
|
||||
can_post_category.save
|
||||
|
||||
Category.post_create_allowed(guardian).count.should == 3
|
||||
|
||||
# anonymous has permission to create no topics
|
||||
guardian = Guardian.new(nil)
|
||||
Category.post_create_allowed(guardian).count.should == 0
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe "post_create_allowed" do
|
||||
|
||||
end
|
||||
|
||||
describe "security" do
|
||||
let(:category) { Fabricate(:category) }
|
||||
let(:category_2) { Fabricate(:category) }
|
||||
|
Reference in New Issue
Block a user