mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 01:47:46 +08:00
FIX: staff/admin shouldn’t be able to create uncategorized topics (#7077)
This commit is contained in:
@ -95,8 +95,7 @@ class Topic < ActiveRecord::Base
|
||||
if: Proc.new { |t|
|
||||
(t.new_record? || t.category_id_changed?) &&
|
||||
!SiteSetting.allow_uncategorized_topics &&
|
||||
(t.archetype.nil? || t.regular?) &&
|
||||
(!t.user_id || !t.user.staff?)
|
||||
(t.archetype.nil? || t.regular?)
|
||||
}
|
||||
|
||||
validates :featured_link, allow_nil: true, url: true
|
||||
|
Reference in New Issue
Block a user