From 072f38a373562e2f14a9ee4c0abcf09ae311b9f3 Mon Sep 17 00:00:00 2001 From: jomo Date: Tue, 19 Jul 2016 14:50:03 +0200 Subject: check mod+ rank when updating comment --- app/controllers/comments_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index 49975cd..b69053e 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -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 -- cgit v1.2.3