mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
prevent users from ever changing the category of a topic in a support category
This commit is contained in:
@@ -540,6 +540,7 @@ class Topic < ActiveRecord::Base
|
||||
|
||||
def change_category_to_id(category_id)
|
||||
return false if private_message?
|
||||
return false if category.try(:is_support)
|
||||
|
||||
new_category_id = category_id.to_i
|
||||
# if the category name is blank, reset the attribute
|
||||
|
||||
Reference in New Issue
Block a user