comments: allow new users to comment.
Remove the rule that users less than a week old can't leave comments.
This commit is contained in:
@@ -83,8 +83,6 @@ class Comment < ApplicationRecord
|
||||
def validate_creator_is_not_limited
|
||||
if creator.is_comment_limited? && !do_not_bump_post?
|
||||
errors.add(:base, "You can only post #{Danbooru.config.member_comment_limit} comments per hour")
|
||||
elsif !creator.can_comment?
|
||||
errors.add(:base, "You can not post comments within 1 week of sign up")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -394,14 +394,6 @@ class User < ApplicationRecord
|
||||
end
|
||||
end
|
||||
|
||||
def can_comment?
|
||||
if is_gold?
|
||||
true
|
||||
else
|
||||
created_at <= Danbooru.config.member_comment_time_threshold
|
||||
end
|
||||
end
|
||||
|
||||
def is_comment_limited?
|
||||
if is_gold?
|
||||
false
|
||||
@@ -506,7 +498,7 @@ class User < ApplicationRecord
|
||||
api_burst_limit remaining_api_limit statement_timeout
|
||||
favorite_group_limit favorite_limit tag_query_limit
|
||||
is_comment_limited?
|
||||
can_comment? max_saved_searches theme
|
||||
max_saved_searches theme
|
||||
]
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user