mirror of
https://github.com/discourse/discourse.git
synced 2025-06-10 17:57:48 +08:00
UX: show staged users' email addresses to staff without requiring a button press
This commit is contained in:
@ -53,8 +53,11 @@
|
|||||||
{{avatar user imageSize="small"}}
|
{{avatar user imageSize="small"}}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td class="username">
|
||||||
{{#link-to 'adminUser' user}}{{unbound user.username}}{{/link-to}}
|
{{#link-to 'adminUser' user}}{{unbound user.username}}{{/link-to}}
|
||||||
|
{{#if user.staged}}
|
||||||
|
{{d-icon "envelope-o" title="user.staged" }}
|
||||||
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
<td class='email'>
|
<td class='email'>
|
||||||
{{unbound user.email}}
|
{{unbound user.email}}
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
<h2>{{user.title}}</h2>
|
<h2>{{user.title}}</h2>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if showCheckEmail}}
|
{{#if user.staged}}
|
||||||
<h2 class="staged">{{i18n 'user.staged'}}</h2>
|
<h2 class="staged">{{i18n 'user.staged'}}</h2>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
@ -176,6 +176,12 @@ $mobile-breakpoint: 700px;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.admin-users .users-list {
|
||||||
|
.username .fa {
|
||||||
|
color: dark-light-choose($primary-medium, $secondary-medium);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.ip-lookup {
|
.ip-lookup {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -36,7 +36,8 @@ class AdminUserListSerializer < BasicUserSerializer
|
|||||||
|
|
||||||
def include_email?
|
def include_email?
|
||||||
# staff members can always see their 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
|
end
|
||||||
|
|
||||||
alias_method :include_associated_accounts?, :include_email?
|
alias_method :include_associated_accounts?, :include_email?
|
||||||
|
@ -141,7 +141,8 @@ class UserSerializer < BasicUserSerializer
|
|||||||
end
|
end
|
||||||
|
|
||||||
def include_email?
|
def include_email?
|
||||||
object.id && object.id == scope.user.try(:id)
|
(object.id && object.id == scope.user.try(:id)) ||
|
||||||
|
(scope.is_staff? && object.staged?)
|
||||||
end
|
end
|
||||||
|
|
||||||
def can_change_bio
|
def can_change_bio
|
||||||
|
Reference in New Issue
Block a user