appeals: raise appeal limits.

The old limit was one appeal per day. The new limit is based on your
upload limit. Each appeal costs 3 upload slots. If you have 15 upload
slots, then you can appeal up to 5 posts at once, but you won't be able
to appeal or upload more until your appeals are approved or rejected. If
you have unlimited uploads, then you have unlimited appeals.
This commit is contained in:
evazion
2020-08-08 10:37:51 -05:00
parent 3a17b5a13e
commit e8dcc9c56e
4 changed files with 48 additions and 31 deletions

View File

@@ -349,6 +349,11 @@ class User < ApplicationRecord
end
end
def is_appeal_limited?
return false if can_upload_free?
upload_limit.free_upload_slots < UploadLimit::APPEAL_COST
end
def upload_limit
@upload_limit ||= UploadLimit.new(self)
end