mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
UX: show staged users' email addresses to staff without requiring a button press
This commit is contained in:
@ -36,7 +36,8 @@ class AdminUserListSerializer < BasicUserSerializer
|
||||
|
||||
def include_email?
|
||||
# staff members can always see their email
|
||||
(scope.is_staff? && object.id == scope.user.id) || scope.can_see_emails?
|
||||
(scope.is_staff? && object.id == scope.user.id) || scope.can_see_emails? ||
|
||||
(scope.is_staff? && object.staged?)
|
||||
end
|
||||
|
||||
alias_method :include_associated_accounts?, :include_email?
|
||||
|
Reference in New Issue
Block a user