mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 11:04:57 +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
|