DEV: Introduce SiteSetting to enable/disable Sidebar. (#17662)

This commit removes the ability to enable/disable the Sidebar on a per
user basis and introduces a site wide setting. For testing purposes, sidebar can be enabled/disabled via the `enable_sidebar=1` or `enable_sidebar=0` query param.
This commit is contained in:
Alan Guo Xiang Tan
2022-07-27 13:42:26 +08:00
committed by GitHub
parent 83f4e45664
commit 3bd5f2d411
29 changed files with 274 additions and 285 deletions

View File

@ -1824,7 +1824,7 @@ class UsersController < ApplicationController
permitted.concat UserUpdater::TAG_NAMES.keys
permitted << UserUpdater::NOTIFICATION_SCHEDULE_ATTRS
if current_user&.user_option&.enable_experimental_sidebar
if SiteSetting.enable_experimental_sidebar_hamburger
if params.has_key?(:sidebar_category_ids) && params[:sidebar_category_ids].blank?
params[:sidebar_category_ids] = []
end