mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 16:03:59 +08:00
12 lines
207 B
Ruby
12 lines
207 B
Ruby
class GroupShowSerializer < BasicGroupSerializer
|
|
attributes :is_group_user
|
|
|
|
def include_is_group_user?
|
|
scope.authenticated?
|
|
end
|
|
|
|
def is_group_user
|
|
object.users.include?(scope.user)
|
|
end
|
|
end
|