readonly mode

This commit is contained in:
Régis Hanol
2014-02-12 20:37:28 -08:00
parent faf03fdeb1
commit e7472dc374
6 changed files with 84 additions and 25 deletions

View File

@@ -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