mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 11:15:05 +08:00
FIX: Incorrect admin sidebar setting migration (#25192)
Fixes the migration in 8c6144d116
which was unconditionally enabling the new admin sidebar for admins
if they ever changed the old setting `enable_admin_sidebar_navigation`,
even if they changed it to false.
This commit is contained in:
parent
cef6aca6e5
commit
f2105727c2
|
@ -7,7 +7,7 @@ class ChangeEnableAdminSidebarToGroupPostMigration < ActiveRecord::Migration[7.0
|
|||
"SELECT value FROM site_settings WHERE name = 'enable_admin_sidebar_navigation'",
|
||||
).first
|
||||
|
||||
if enable_admin_sidebar_navigation_raw.present?
|
||||
if enable_admin_sidebar_navigation_raw.present? && enable_admin_sidebar_navigation_raw == "t"
|
||||
DB.exec(
|
||||
"INSERT INTO site_settings(name, value, data_type, created_at, updated_at)
|
||||
VALUES('admin_sidebar_enabled_groups', :setting, '20', NOW(), NOW())",
|
||||
|
|
Loading…
Reference in New Issue
Block a user