A new guard for changing post timestamps called can_change_post_timestamps?

This commit is contained in:
Kiffin Gish
2016-11-06 20:14:09 +01:00
parent 36127b6eca
commit 3aa22715af
2 changed files with 5 additions and 1 deletions

View File

@@ -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,