diff --git a/app/assets/javascripts/discourse/components/topic-timer-info.js.es6 b/app/assets/javascripts/discourse/components/topic-timer-info.js.es6 index a96595a84ab..288e61b3bb6 100644 --- a/app/assets/javascripts/discourse/components/topic-timer-info.js.es6 +++ b/app/assets/javascripts/discourse/components/topic-timer-info.js.es6 @@ -1,6 +1,8 @@ import { iconHTML } from "discourse-common/lib/icon-library"; import { bufferedRender } from "discourse-common/lib/buffered-render"; import Category from "discourse/models/category"; +import computed from "ember-addons/ember-computed-decorators"; +import { REMINDER_TYPE } from "discourse/controllers/edit-topic-timer"; export default Ember.Component.extend( bufferedRender({ @@ -16,6 +18,12 @@ export default Ember.Component.extend( "categoryId" ], + @computed("statusType") + canRemoveTimer(type) { + if (type === REMINDER_TYPE) return true; + return this.currentUser && this.currentUser.get("canManageTopic"); + }, + buildBuffer(buffer) { if (!this.executeAt) return; @@ -65,7 +73,7 @@ export default Ember.Component.extend( "far-clock" )} ${I18n.t(this._noticeKey(), options)}` ); - if (this.removeTopicTimer) { + if (this.removeTopicTimer && this.canRemoveTimer) { buffer.push( `