summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjomo <github@jomo.tv>2016-07-19 14:50:03 +0200
committerjomo <github@jomo.tv>2016-07-19 14:50:03 +0200
commit072f38a373562e2f14a9ee4c0abcf09ae311b9f3 (patch)
tree986727a495723d59e6f8df6b01eb83adc9e3e52f
parentd9ae4e7d3a3fbfd19d7d549692dc71b6e76060f7 (diff)
check mod+ rank when updating comment
-rw-r--r--app/controllers/comments_controller.rb2
1 files changed, 1 insertions, 1 deletions
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