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:
evazion
2020-03-21 22:23:29 -05:00
parent aefbed57b8
commit 63f7311489
9 changed files with 4 additions and 50 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -13,9 +13,9 @@
</ul>
<div class="section">
<h6>Post/Comment Limiting</h6>
<p>You cannot upload a post or comment during the first week of signing up.</p>
<p>After the initial period, you can post up to two comments an hour and a variable number of posts based on how many of your previous uploads were approved or deleted.</p>
<h6>Post Limiting</h6>
<p>You cannot upload a post during the first week of signing up.</p>
<p>After the initial period, you can post a variable number of posts based on how many of your previous uploads were approved or deleted.</p>
</div>
<div class="section">