mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FEATURE: public custom sidebar sections visible to anonymous (#20931)
Previously, public custom sections were only visible to logged-in users. In this PR, we are making them visible to anonymous as well. The reason is that Community Section will be moved into custom section model to be easily editable by admins.
This commit is contained in:

committed by
GitHub

parent
cd6d47e012
commit
e586f6052f
@ -25,6 +25,7 @@ class SidebarSectionsController < ApplicationController
|
||||
nil,
|
||||
group_ids: SiteSetting.enable_custom_sidebar_sections_map,
|
||||
)
|
||||
Site.clear_anon_cache!
|
||||
end
|
||||
|
||||
render json: SidebarSectionSerializer.new(sidebar_section)
|
||||
@ -48,6 +49,7 @@ class SidebarSectionsController < ApplicationController
|
||||
nil,
|
||||
group_ids: SiteSetting.enable_custom_sidebar_sections_map,
|
||||
)
|
||||
Site.clear_anon_cache!
|
||||
end
|
||||
|
||||
render json: SidebarSectionSerializer.new(sidebar_section)
|
||||
|
Reference in New Issue
Block a user