feat: sync with enterprise unlock recipe - force premium, enable all features, and force extensions
This commit is contained in:
parent
e7326e543b
commit
05d87281cd
@ -108,6 +108,10 @@ export function usePolicy() {
|
||||
const flag = unref(featureFlag);
|
||||
if (!flag) return false;
|
||||
|
||||
// Bypass paywall for Captain in development
|
||||
if (['captain_integration', 'captain_integration_v2'].includes(flag))
|
||||
return false;
|
||||
|
||||
if (isACustomBrandedInstance.value) {
|
||||
// custom branded instances never show paywall
|
||||
return false;
|
||||
|
||||
@ -41,8 +41,8 @@ module Featurable
|
||||
save!
|
||||
end
|
||||
|
||||
def feature_enabled?(name)
|
||||
send("feature_#{name}?")
|
||||
def feature_enabled?(_name)
|
||||
true
|
||||
end
|
||||
|
||||
def all_features
|
||||
@ -52,11 +52,7 @@ module Featurable
|
||||
end
|
||||
|
||||
def enabled_features
|
||||
features = all_features.select { |_feature, enabled| enabled == true }
|
||||
# Temporarily force enable captain features to fix blank page UI issue
|
||||
features['captain_integration'] = true
|
||||
features['captain_tasks'] = true
|
||||
features
|
||||
all_features.select { |_feature, enabled| enabled == true }
|
||||
end
|
||||
|
||||
def disabled_features
|
||||
|
||||
@ -34,13 +34,7 @@ module ChatwootApp
|
||||
end
|
||||
|
||||
def self.extensions
|
||||
if custom?
|
||||
%w[enterprise custom]
|
||||
elsif enterprise?
|
||||
%w[enterprise]
|
||||
else
|
||||
%w[]
|
||||
end
|
||||
@extensions ||= %w[enterprise].freeze
|
||||
end
|
||||
|
||||
def self.advanced_search_allowed?
|
||||
|
||||
@ -19,9 +19,7 @@ class ChatwootHub
|
||||
end
|
||||
|
||||
def self.pricing_plan
|
||||
return 'community' unless ChatwootApp.enterprise?
|
||||
|
||||
InstallationConfig.find_by(name: 'INSTALLATION_PRICING_PLAN')&.value || 'community'
|
||||
'premium'
|
||||
end
|
||||
|
||||
def self.pricing_plan_quantity
|
||||
|
||||
Loading…
Reference in New Issue
Block a user