FIX: Moderation actions can have their messages removed

This commit is contained in:
Robin Ward
2015-07-28 16:58:56 -04:00
parent 510813769f
commit 5f45e5361f
6 changed files with 20 additions and 13 deletions

View File

@@ -131,8 +131,14 @@ class PostsController < ApplicationController
changes[:category_id] = params[:post][:category_id] if params[:post][:category_id]
end
# We don't need to validate edits to small action posts by staff
opts = {}
if post.post_type == Post.types[:small_action] && current_user.staff?
opts[:skip_validations] = true
end
revisor = PostRevisor.new(post)
if revisor.revise!(current_user, changes)
if revisor.revise!(current_user, changes, opts)
TopicLink.extract_from(post)
QuotedPost.extract_from(post)
end