UX: show staged users' email addresses to staff without requiring a button press
This commit is contained in:
parent
510a2a1e0f
commit
39d7745dc5
|
@ -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}}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<h2>{{user.title}}</h2>
|
||||
{{/if}}
|
||||
|
||||
{{#if showCheckEmail}}
|
||||
{{#if user.staged}}
|
||||
<h2 class="staged">{{i18n 'user.staged'}}</h2>
|
||||
{{/if}}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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?
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue