This functionality shows up when you are administrator, but not for moderators:
The front-end code for this is here:
https://github.com/discourse/discourse/blob/52672b9eabccb1184d85dc7f08062d5a7c18cb73/app/assets/javascripts/discourse/app/controllers/move-to-topic.js#L109-L112
Note the “this.currentUser.admin
”.
However, the back-end allows for moderators (all staff) to perform this action just fine:
https://github.com/discourse/discourse/blob/5cf411c3aec01f48c26e71de5440ff4c0512c266/app/controllers/topics_controller.rb#L709-L715
https://github.com/discourse/discourse/blob/5cf411c3aec01f48c26e71de5440ff4c0512c266/app/controllers/topics_controller.rb#L737-L740
https://github.com/discourse/discourse/blob/9f73e8779d3ae7a1646473d4138a85c3660a58db/lib/guardian/topic_guardian.rb#L205-L220
I think the front-end code should be adjusted:
@discourseComputed("canSplitTopic")
canSplitToPM(canSplitTopic) {
- return canSplitTopic && this.currentUser && this.currentUser.admin;
+ return canSplitTopic && this.currentUser && this.currentUser.staff;
},
If you agree with this being a bug I’d be happy to make a PR to fix it. Our moderation team would have need of this fix.