mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
readonly mode
This commit is contained in:
@@ -8,7 +8,8 @@ class SiteSerializer < ApplicationSerializer
|
||||
:periods,
|
||||
:top_menu_items,
|
||||
:anonymous_top_menu_items,
|
||||
:uncategorized_category_id # this is hidden so putting it here
|
||||
:uncategorized_category_id, # this is hidden so putting it here
|
||||
:is_readonly
|
||||
|
||||
has_many :categories, serializer: BasicCategorySerializer, embed: :objects
|
||||
has_many :post_action_types, embed: :objects
|
||||
@@ -45,4 +46,8 @@ class SiteSerializer < ApplicationSerializer
|
||||
SiteSetting.uncategorized_category_id
|
||||
end
|
||||
|
||||
def is_readonly
|
||||
Discourse.readonly_mode?
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user