mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 09:33:37 +08:00
71bf9ec1b2
Co-Authored-By: majakomel <maja.komel@gmail.com> Co-Authored-By: Robin Ward <robin.ward@gmail.com>
16 lines
288 B
Ruby
16 lines
288 B
Ruby
# frozen_string_literal: true
|
|
|
|
class HiddenTopicViewSerializer < ApplicationSerializer
|
|
attributes :view_hidden?
|
|
|
|
has_one :group, serializer: BasicGroupSerializer, root: false, embed: :objects
|
|
|
|
def view_hidden?
|
|
true
|
|
end
|
|
|
|
def group
|
|
object.access_topic_via_group
|
|
end
|
|
end
|