mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 00:43:24 +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
|