From c3c4952e3551109f6282ca37b0acdbcd18529213 Mon Sep 17 00:00:00 2001 From: r888888888 Date: Fri, 17 Mar 2017 12:15:36 -0700 Subject: [PATCH] do not limit flags for system user --- app/models/post_flag.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/post_flag.rb b/app/models/post_flag.rb index d2f42364e..6e232638f 100644 --- a/app/models/post_flag.rb +++ b/app/models/post_flag.rb @@ -97,6 +97,8 @@ class PostFlag < ActiveRecord::Base def validate_creator_is_not_limited if CurrentUser.can_approve_posts? # do nothing + elsif User.system.present? && CurrentUser.id == User.system.id + # do nothing elsif creator.created_at > 1.week.ago errors[:creator] << "cannot flag within the first week of sign up" elsif creator.is_gold? && flag_count_for_creator >= 10