diff --git a/app/assets/javascripts/discourse/models/composer.js b/app/assets/javascripts/discourse/models/composer.js index b5f002501e2..2343286033a 100644 --- a/app/assets/javascripts/discourse/models/composer.js +++ b/app/assets/javascripts/discourse/models/composer.js @@ -126,7 +126,12 @@ Discourse.Composer = Discourse.Model.extend({ // reply is always required if (this.get('missingReplyCharacters') > 0) return true; - if (this.get('canCategorize') && !Discourse.SiteSettings.allow_uncategorized_topics && !this.get('categoryId')) return true; + if (this.get('canCategorize') && + !Discourse.SiteSettings.allow_uncategorized_topics && + !this.get('categoryId') && + !Discourse.User.currentProp('staff')) { + return true; + } return false; }.property('loading', 'canEditTitle', 'titleLength', 'targetUsernames', 'replyLength', 'categoryId', 'missingReplyCharacters'), diff --git a/app/assets/javascripts/discourse/views/category_chooser_view.js b/app/assets/javascripts/discourse/views/category_chooser_view.js index 005ff0c642a..1ef513876ea 100644 --- a/app/assets/javascripts/discourse/views/category_chooser_view.js +++ b/app/assets/javascripts/discourse/views/category_chooser_view.js @@ -25,12 +25,12 @@ Discourse.CategoryChooserView = Discourse.ComboboxView.extend({ }, none: function() { - if (!Discourse.SiteSettings.allow_uncategorized_topics) { - return 'category.choose'; - } else if (Discourse.SiteSettings.allow_uncategorized_topics || this.get('showUncategorized')) { + if (Discourse.User.currentProp('staff') || Discourse.SiteSettings.allow_uncategorized_topics) { return 'category.none'; + } else { + return 'category.choose'; } - }.property('showUncategorized'), + }.property(), template: function(text, templateData) { if (!templateData.color) return text; diff --git a/app/models/topic.rb b/app/models/topic.rb index 83aef6bc5aa..a64cc86202c 100644 --- a/app/models/topic.rb +++ b/app/models/topic.rb @@ -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?) }