mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
hide bookmarks count in user summary except for yourself
This commit is contained in:
parent
f7e552e131
commit
03605f1b01
3 changed files with 11 additions and 1 deletions
|
@ -43,6 +43,10 @@ class UserSummarySerializer < ApplicationSerializer
|
|||
SiteSetting.enable_badges
|
||||
end
|
||||
|
||||
def include_bookmark_count?
|
||||
scope.authenticated? && object.user_id == scope.user.id
|
||||
end
|
||||
|
||||
def time_read
|
||||
AgeWords.age_words(object.time_read)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue