2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

Staff can create uncategorized topics even if allow_uncategorized_topics is false

This commit is contained in:
Neil Lalonde 2014-01-15 15:58:15 -05:00
parent ed87a589ca
commit 2a33a35566
3 changed files with 12 additions and 6 deletions

View file

@ -59,7 +59,8 @@ class Topic < ActiveRecord::Base
:if => Proc.new { |t|
(t.new_record? || t.category_id_changed?) &&
!SiteSetting.allow_uncategorized_topics &&
(t.archetype.nil? || t.archetype == Archetype.default)
(t.archetype.nil? || t.archetype == Archetype.default) &&
(!t.user_id || !t.user.staff?)
}