Admins can view user e-mails too
They could do this anyway by doing simple SELECTs. This change is just to make admins' lives easier.
This commit is contained in:
parent
5d5440a8f1
commit
c90561e4ce
4 changed files with 5 additions and 3 deletions
|
@ -65,6 +65,7 @@ deletePost.all=moderator
|
||||||
|
|
||||||
listUsers=registered
|
listUsers=registered
|
||||||
viewUser=registered
|
viewUser=registered
|
||||||
|
viewUserEmail=admin
|
||||||
changeUserPassword.own=registered
|
changeUserPassword.own=registered
|
||||||
changeUserPassword.all=admin
|
changeUserPassword.all=admin
|
||||||
changeUserEmail.own=registered
|
changeUserEmail.own=registered
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#sidebar {
|
#sidebar {
|
||||||
width: 200px;
|
width: 220px;
|
||||||
font-size: 90%;
|
font-size: 90%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ class Privilege extends Enum
|
||||||
|
|
||||||
const ListUsers = 11;
|
const ListUsers = 11;
|
||||||
const ViewUser = 12;
|
const ViewUser = 12;
|
||||||
|
const ViewUserEmail = 22;
|
||||||
const BanUser = 13;
|
const BanUser = 13;
|
||||||
const AcceptUserRegistration = 14;
|
const AcceptUserRegistration = 14;
|
||||||
const ChangeUserPassword = 15;
|
const ChangeUserPassword = 15;
|
||||||
|
|
|
@ -19,11 +19,11 @@
|
||||||
<span class="value" title="<?php echo $val = TextHelper::camelCaseToHumanCase(AccessRank::toString($this->context->transport->user->access_rank)) ?>"><?php echo $val ?></span>
|
<span class="value" title="<?php echo $val = TextHelper::camelCaseToHumanCase(AccessRank::toString($this->context->transport->user->access_rank)) ?>"><?php echo $val ?></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if ($this->context->user->id == $this->context->transport->user->id): ?>
|
<?php if (PrivilegesHelper::confirm($this->context->user, Privilege::ViewUserEmail)): ?>
|
||||||
<div class="key-value email">
|
<div class="key-value email">
|
||||||
<span class="key">E-mail:</span>
|
<span class="key">E-mail:</span>
|
||||||
<span class="value" title="<?php echo $val = ($this->context->transport->user->email_unconfirmed ? '(unconfirmed) ' . $this->context->transport->user->email_unconfirmed : $this->context->transport->user->email_confirmed ?: 'none specified') ?>"><?php echo $val ?></span>
|
<span class="value" title="<?php echo $val = ($this->context->transport->user->email_unconfirmed ? '(unconfirmed) ' . $this->context->transport->user->email_unconfirmed : $this->context->transport->user->email_confirmed ?: 'none specified') ?>"><?php echo $val ?></span>
|
||||||
<br>(only you can see this)
|
<br>(only you and staff can see this)
|
||||||
</div>
|
</div>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue