chore: Enable plan reconcile in self hosted (#9357)
This PR will revert the premium config in self hosted instances to its original state if any unauthorised modifications are made.
This commit is contained in:
@@ -5,8 +5,7 @@ class Internal::ReconcilePlanConfigService
|
|||||||
|
|
||||||
create_premium_config_reset_warning if premium_config_reset_required?
|
create_premium_config_reset_warning if premium_config_reset_required?
|
||||||
|
|
||||||
# We will have this enabled in the future
|
reconcile_premium_config
|
||||||
# reconcile_premium_config
|
|
||||||
reconcile_premium_features
|
reconcile_premium_features
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -34,15 +34,13 @@ RSpec.describe Internal::ReconcilePlanConfigService do
|
|||||||
expect(Redis::Alfred.get(Redis::Alfred::CHATWOOT_INSTALLATION_CONFIG_RESET_WARNING)).to be_nil
|
expect(Redis::Alfred.get(Redis::Alfred::CHATWOOT_INSTALLATION_CONFIG_RESET_WARNING)).to be_nil
|
||||||
end
|
end
|
||||||
|
|
||||||
# To be enabled in the future when method is uncommented
|
it 'updates the premium configs to default' do
|
||||||
|
create(:installation_config, name: 'INSTALLATION_NAME', value: 'custom-name')
|
||||||
# it 'updates the premium configs to default' do
|
create(:installation_config, name: 'LOGO', value: '/custom-path/logo.svg')
|
||||||
# create(:installation_config, name: 'INSTALLATION_NAME', value: 'custom-name')
|
service.perform
|
||||||
# create(:installation_config, name: 'LOGO', value: '/custom-path/logo.svg')
|
expect(InstallationConfig.find_by(name: 'INSTALLATION_NAME').value).to eq('Chatwoot')
|
||||||
# service.perform
|
expect(InstallationConfig.find_by(name: 'LOGO').value).to eq('/brand-assets/logo.svg')
|
||||||
# expect(InstallationConfig.find_by(name: 'INSTALLATION_NAME').value).to eq('Chatwoot')
|
end
|
||||||
# expect(InstallationConfig.find_by(name: 'LOGO').value).to eq('/brand-assets/logo.svg')
|
|
||||||
# end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when pricing plan is not community' do
|
context 'when pricing plan is not community' do
|
||||||
|
|||||||
Reference in New Issue
Block a user