feat: bypass user limit validation to allow unlimited agents
This commit is contained in:
parent
05d87281cd
commit
389cbcbb61
@ -9,8 +9,6 @@ module Enterprise::Concerns::User
|
|||||||
end
|
end
|
||||||
|
|
||||||
def ensure_installation_pricing_plan_quantity
|
def ensure_installation_pricing_plan_quantity
|
||||||
return unless ChatwootHub.pricing_plan == 'premium'
|
true
|
||||||
|
|
||||||
errors.add(:base, 'User limit reached. Please purchase more licenses from super admin') if User.count >= ChatwootHub.pricing_plan_quantity
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -23,9 +23,7 @@ class ChatwootHub
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.pricing_plan_quantity
|
def self.pricing_plan_quantity
|
||||||
return 0 unless ChatwootApp.enterprise?
|
1000
|
||||||
|
|
||||||
InstallationConfig.find_by(name: 'INSTALLATION_PRICING_PLAN_QUANTITY')&.value || 0
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.support_config
|
def self.support_config
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user