chore: Cleanup feature flags (#6096)

- Add more feature flags for CRM, auto_resolution, and reports
- Add a SuperAdmin link in the sidebar if the user is a super-admin
- SuperAdmin could view all the features on an account irrespective of whether the feature is enabled.
This commit is contained in:
Pranav Raj S
2022-12-19 09:08:30 -08:00
committed by GitHub
parent ca88eb55f4
commit 2dfe38ae4d
14 changed files with 99 additions and 15 deletions

View File

@@ -0,0 +1,16 @@
class EnabledNewFeatures < ActiveRecord::Migration[6.1]
def change
Account.find_in_batches do |account_batch|
account_batch.each do |account|
account.enable_features(
'channel_website',
'campaigns',
'reports',
'crm',
'auto_resolve_conversations'
)
account.save!
end
end
end
end

View File

@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2022_11_16_000514) do
ActiveRecord::Schema.define(version: 2022_12_19_162759) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_stat_statements"