2
0
Fork 0
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:
Régis Hanol 2016-05-09 15:51:43 +02:00
parent f7e552e131
commit 03605f1b01
3 changed files with 11 additions and 1 deletions

View file

@ -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