mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
:s/moderator?/staff/g ... our naming was kind of crazy, renamed moderator? to staff
This commit is contained in:
@@ -7,6 +7,7 @@ class CurrentUserSerializer < BasicUserSerializer
|
||||
:notification_channel_position,
|
||||
:site_flagged_posts_count,
|
||||
:moderator?,
|
||||
:staff?,
|
||||
:reply_count,
|
||||
:topic_count,
|
||||
:enable_quoting,
|
||||
@@ -15,15 +16,8 @@ class CurrentUserSerializer < BasicUserSerializer
|
||||
|
||||
# we probably want to move this into site, but that json is cached so hanging it off current user seems okish
|
||||
|
||||
def moderator
|
||||
# TODO we probably want better terminology
|
||||
#
|
||||
# we have admins / moderators and users who are either moderators or admins denoted by moderator?
|
||||
object.moderator?
|
||||
end
|
||||
|
||||
def include_site_flagged_posts_count?
|
||||
object.moderator?
|
||||
object.staff?
|
||||
end
|
||||
|
||||
def topic_count
|
||||
@@ -34,10 +28,6 @@ class CurrentUserSerializer < BasicUserSerializer
|
||||
object.posts.where("post_number > 1").count
|
||||
end
|
||||
|
||||
def moderator?
|
||||
object.moderator?
|
||||
end
|
||||
|
||||
def site_flagged_posts_count
|
||||
PostAction.flagged_posts_count
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user