chore: Add internal feature flags for Chatwoot Cloud (#10902)
This PR introduces internal feature flags for testing purposes. These flags will not be displayed on regular instances to prevent customer confusion. Additionally, a new feature flag, `contact_chatwoot_support_team`, has been added for Chatwoot Cloud. This flag disables contact support for third-party onboarded accounts, as support will be handled by the original affiliate team. Co-authored-by: Pranav <pranav@chatwoot.com>
This commit is contained in:
@@ -6,4 +6,14 @@ module SuperAdmin::AccountFeaturesHelper
|
||||
def self.account_premium_features
|
||||
account_features.filter { |feature| feature['premium'] }.pluck('name')
|
||||
end
|
||||
|
||||
# Accepts account.features as argument
|
||||
def self.filtered_features(features)
|
||||
deployment_env = GlobalConfig.get_value('DEPLOYMENT_ENV')
|
||||
return features if deployment_env == 'cloud'
|
||||
|
||||
# Filter out internal features for non-cloud environments
|
||||
internal_features = account_features.select { |f| f['chatwoot_internal'] }.pluck('name')
|
||||
features.except(*internal_features)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user