FEATURE: enable new admin sidebar by default (#26391)

By default, enable the new admin sidebar.
In addition, migration was created for old sites to keep the old admin panel.
This commit is contained in:
Krzysztof Kotlarek 2024-04-08 09:57:27 +10:00 committed by GitHub
parent eaaffc025c
commit 3ce386c22f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 17 additions and 1 deletions

View File

@ -2361,7 +2361,7 @@ developer:
admin_sidebar_enabled_groups:
type: group_list
list_type: compact
default: ""
default: "1"
allow_any: false
refresh: true
lazy_load_categories_groups:

View File

@ -0,0 +1,16 @@
# frozen_string_literal: true
class DisableAdminSidebarForExistingSites < ActiveRecord::Migration[7.0]
def up
# keep old admin menu for existing sites
execute <<~SQL if Migration::Helpers.existing_site?
INSERT INTO site_settings(name, data_type, value, created_at, updated_at)
VALUES('admin_sidebar_enabled_groups', 20, '-1', NOW(), NOW())
ON CONFLICT (name) DO NOTHING
SQL
end
def down
raise ActiveRecord::IrreversibleMigration
end
end