UX: show staged users' email addresses to staff without requiring a button press

This commit is contained in:
Neil Lalonde 2017-11-24 16:11:34 -05:00
parent 510a2a1e0f
commit 39d7745dc5
5 changed files with 15 additions and 4 deletions

View File

@ -53,8 +53,11 @@
{{avatar user imageSize="small"}}
</a>
</td>
<td>
<td class="username">
{{#link-to 'adminUser' user}}{{unbound user.username}}{{/link-to}}
{{#if user.staged}}
{{d-icon "envelope-o" title="user.staged" }}
{{/if}}
</td>
<td class='email'>
{{unbound user.email}}

View File

@ -31,7 +31,7 @@
<h2>{{user.title}}</h2>
{{/if}}
{{#if showCheckEmail}}
{{#if user.staged}}
<h2 class="staged">{{i18n 'user.staged'}}</h2>
{{/if}}

View File

@ -176,6 +176,12 @@ $mobile-breakpoint: 700px;
}
}
.admin-users .users-list {
.username .fa {
color: dark-light-choose($primary-medium, $secondary-medium);
}
}
.ip-lookup {
position: relative;
display: inline-block;

View File

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

View File

@ -141,7 +141,8 @@ class UserSerializer < BasicUserSerializer
end
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
def can_change_bio