check mod+ rank when updating comment
This commit is contained in:
@@ -33,7 +33,7 @@ class CommentsController < ApplicationController
|
||||
|
||||
def update
|
||||
@comment = Comment.find(params[:id])
|
||||
if mod? || @comment.author.is?(current_user)
|
||||
if (mod? && current_user.role >= @comment.author.role) || @comment.author.is?(current_user)
|
||||
@comment.user_editor = current_user
|
||||
@comment.attributes = comment_params
|
||||
old_content = @comment.content_was
|
||||
|
||||
Reference in New Issue
Block a user