Skip to content

A platform for community discussion. Free, open, simple.

UX: check category permission before new topic quote (#30753)

Kris7330cfa76a6e
diff --git a/app/assets/javascripts/discourse/app/controllers/topic.js b/app/assets/javascripts/discourse/app/controllers/topic.js
index 57a219f8e06..435da4d4032 100644
--- a/app/assets/javascripts/discourse/app/controllers/topic.js
+++ b/app/assets/javascripts/discourse/app/controllers/topic.js
@@ -1201,7 +1201,9 @@ export default class TopicController extends Controller.extend(
options = {
action: Composer.CREATE_TOPIC,
draftKey: post.topic.draft_key,
- topicCategoryId: this.get("model.category.id"),
+ topicCategoryId:
+ this.get("model.category.permission") &&
+ this.get("model.category.id"),
prioritizedCategoryId: this.get("model.category.id"),
};
}