FEATURE: Allow posting a link with topics

This commit is contained in:
Erick Guan
2016-12-05 13:31:43 +01:00
parent e82084405e
commit 52763f5115
50 changed files with 503 additions and 77 deletions

View File

@@ -23,7 +23,8 @@ class SiteSerializer < ApplicationSerializer
:can_tag_topics,
:tags_filter_regexp,
:top_tags,
:wizard_required
:wizard_required,
:topic_featured_link_allowed_category_ids
has_many :categories, serializer: BasicCategorySerializer, embed: :objects
has_many :trust_levels, embed: :objects
@@ -121,4 +122,12 @@ class SiteSerializer < ApplicationSerializer
def include_wizard_required?
Wizard.user_requires_completion?(scope.user)
end
def include_topic_featured_link_allowed_category_ids?
SiteSetting.topic_featured_link_enabled
end
def topic_featured_link_allowed_category_ids
scope.topic_featured_link_allowed_category_ids
end
end