mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 06:21:12 +08:00
First stab at new user education - configurable messages that pop up on a user's first
few posts/topics.
This commit is contained in:
@ -6,7 +6,8 @@ class CurrentUserSerializer < BasicUserSerializer
|
||||
:admin?,
|
||||
:notification_channel_position,
|
||||
:site_flagged_posts_count,
|
||||
:moderator?
|
||||
:moderator?,
|
||||
:post_count
|
||||
|
||||
# we probably want to move this into site, but that json is cached so hanging it off current user seems okish
|
||||
|
||||
@ -14,6 +15,10 @@ class CurrentUserSerializer < BasicUserSerializer
|
||||
object.admin
|
||||
end
|
||||
|
||||
def post_count
|
||||
object.posts.count
|
||||
end
|
||||
|
||||
def moderator?
|
||||
object.has_trust_level?(:moderator)
|
||||
end
|
||||
|
Reference in New Issue
Block a user