mirror of
https://github.com/discourse/discourse.git
synced 2026-08-07 11:45:21 -05:00
FIX: admins should be able to create topics, even if min_trust_to_create_topic is higher than their trust level
This commit is contained in:
@@ -414,6 +414,7 @@ describe Guardian do
|
||||
SiteSetting.stubs(:min_trust_to_create_topic).returns(1)
|
||||
Guardian.new(build(:user, trust_level: 1)).can_create?(Topic,Fabricate(:category)).should be_true
|
||||
Guardian.new(build(:user, trust_level: 2)).can_create?(Topic,Fabricate(:category)).should be_true
|
||||
Guardian.new(build(:admin, trust_level: 0)).can_create?(Topic,Fabricate(:category)).should be_true
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user