do not limit flags for system user
This commit is contained in:
@@ -97,6 +97,8 @@ class PostFlag < ActiveRecord::Base
|
|||||||
def validate_creator_is_not_limited
|
def validate_creator_is_not_limited
|
||||||
if CurrentUser.can_approve_posts?
|
if CurrentUser.can_approve_posts?
|
||||||
# do nothing
|
# do nothing
|
||||||
|
elsif User.system.present? && CurrentUser.id == User.system.id
|
||||||
|
# do nothing
|
||||||
elsif creator.created_at > 1.week.ago
|
elsif creator.created_at > 1.week.ago
|
||||||
errors[:creator] << "cannot flag within the first week of sign up"
|
errors[:creator] << "cannot flag within the first week of sign up"
|
||||||
elsif creator.is_gold? && flag_count_for_creator >= 10
|
elsif creator.is_gold? && flag_count_for_creator >= 10
|
||||||
|
|||||||
Reference in New Issue
Block a user