diff --git a/app/controllers/topics_controller.rb b/app/controllers/topics_controller.rb index 1a15adc5b5d..404495c06ff 100644 --- a/app/controllers/topics_controller.rb +++ b/app/controllers/topics_controller.rb @@ -492,7 +492,7 @@ class TopicsController < ApplicationController params.require(:topic_id) params.require(:timestamp) - guardian.ensure_can_change_post_owner! + guardian.ensure_can_change_post_timestamps! begin PostTimestampChanger.new( topic_id: params[:topic_id].to_i, diff --git a/lib/guardian/post_guardian.rb b/lib/guardian/post_guardian.rb index 6dc74106d92..c928290efe7 100644 --- a/lib/guardian/post_guardian.rb +++ b/lib/guardian/post_guardian.rb @@ -185,6 +185,10 @@ module PostGuardian is_admin? end + def can_change_post_timestamps? + is_admin? + end + def can_wiki?(post) return false unless authenticated? return true if is_staff? || @user.has_trust_level?(TrustLevel[4])