feat: sync with enterprise unlock recipe - force premium, enable all features, and force extensions

This commit is contained in:
Rodrigo Borba 2026-02-25 19:37:52 -03:00
parent e7326e543b
commit 05d87281cd
4 changed files with 9 additions and 17 deletions

View File

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

View File

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

View File

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

View File

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