Fix #4644: Give unlimited searches for builders

Give Builders unlimited searches, favgroups, and saved searches.
This commit is contained in:
evazion
2021-01-01 19:33:14 -06:00
parent 0b2f9fafa8
commit 890c793d9b

View File

@@ -375,7 +375,9 @@ class User < ApplicationRecord
end end
def tag_query_limit(level) def tag_query_limit(level)
if level >= User::Levels::PLATINUM if level >= User::Levels::BUILDER
Float::INFINITY
elsif level == User::Levels::PLATINUM
12 12
elsif level == User::Levels::GOLD elsif level == User::Levels::GOLD
6 6
@@ -395,7 +397,9 @@ class User < ApplicationRecord
end end
def favorite_group_limit(level) def favorite_group_limit(level)
if level >= User::Levels::PLATINUM if level >= User::Levels::BUILDER
Float::INFINITY
elsif level == User::Levels::PLATINUM
10 10
elsif level == User::Levels::GOLD elsif level == User::Levels::GOLD
5 5
@@ -405,7 +409,9 @@ class User < ApplicationRecord
end end
def max_saved_searches(level) def max_saved_searches(level)
if level >= User::Levels::PLATINUM if level >= User::Levels::BUILDER
Float::INFINITY
elsif level == User::Levels::PLATINUM
1_000 1_000
else else
250 250