Remove Community Chatwoot Hub URL/push relay/sync/registration/event/changelog egress. changelog.js becomes a local empty-feed adapter (no axios/fetch/network) exporting the default ChangelogApi; links.js drops the Hub changelog URL. lib/chatwoot_hub.rb removes base_url/push_notification_url/billing_base_url/ instance_config/send_push/send_push_with_response; billing_url reads only an explicit CHATWOOT_BILLING_URL env, HTTPS-only with host and no userinfo, and never falls back to a Hub URL. Enterprise proprietary base_url override is preserved (spec uses singleton_class.instance_methods(false) for edition-safety). privacy_audit uses a narrow per-file/per-rule Enterprise exception (hub-url only) and privacy_audit_test.sh proves forbidden Enterprise runtime lines are still detected; deployment privacy guard unchanged. Approved by independent five-key review deleg_49d6ee2e (passed=true, blocking arrays empty).
22 lines
909 B
Ruby
22 lines
909 B
Ruby
require 'rails_helper'
|
|
|
|
RSpec.describe SuperAdmin::SettingsController do
|
|
it 'does not expose a manual refresh action' do
|
|
expect(described_class.action_methods).not_to include('refresh')
|
|
end
|
|
|
|
it 'does not leave a manual refresh link in the settings view' do
|
|
template = Rails.root.join('app/views/super_admin/settings/show.html.erb').read
|
|
|
|
expect(template).not_to include('refresh_super_admin_settings_url')
|
|
end
|
|
|
|
it 'renders billing links only when an explicit validated URL exists' do
|
|
settings_template = Rails.root.join('app/views/super_admin/settings/show.html.erb').read
|
|
upgrade_template = Rails.root.join('app/views/super_admin/settings/_upgrade_button_enterprise.html.erb').read
|
|
|
|
expect(settings_template).to include('(billing_url = ChatwootHub.billing_url).present?')
|
|
expect(upgrade_template).to include('(billing_url = ChatwootHub.billing_url).present?')
|
|
end
|
|
end
|