diff --git a/app/assets/javascripts/discourse/controllers/topic_controller.js b/app/assets/javascripts/discourse/controllers/topic_controller.js index 4ae255990..1cc55eeb1 100644 --- a/app/assets/javascripts/discourse/controllers/topic_controller.js +++ b/app/assets/javascripts/discourse/controllers/topic_controller.js @@ -432,7 +432,7 @@ Discourse.TopicController = Discourse.ObjectController.extend({ deletePost: function(post) { // Moderators can delete posts. Regular users can only create a deleted at message. - if (Discourse.get('currentUser.moderator')) { + if (Discourse.get('currentUser.staff')) { post.set('deleted_at', new Date()); } else { post.set('cooked', Discourse.Markdown.cook(Em.String.i18n("post.deleted_by_author"))); diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb index f94381c1e..cfc5971fd 100644 --- a/app/controllers/posts_controller.rb +++ b/app/controllers/posts_controller.rb @@ -186,8 +186,8 @@ class PostsController < ApplicationController def find_post_from_params finder = Post.where(id: params[:id] || params[:post_id]) - # Include deleted posts if the user is a moderator - finder = finder.with_deleted if current_user.try(:moderator?) + # Include deleted posts if the user is staff + finder = finder.with_deleted if current_user.try(:staff?) post = finder.first guardian.ensure_can_see!(post)