mirror of
https://github.com/discourse/discourse.git
synced 2025-02-23 03:31:11 +08:00

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
|