From c90561e4cecb1d6ea4d24ad0a71e9e2cc3730315 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Wed, 16 Oct 2013 20:26:48 +0200 Subject: [PATCH] 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. --- config.ini | 1 + public_html/media/css/user-view.css | 2 +- src/Models/Privilege.php | 1 + src/Views/user-view.phtml | 4 ++-- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/config.ini b/config.ini index 12dcc23f..bff51835 100644 --- a/config.ini +++ b/config.ini @@ -65,6 +65,7 @@ deletePost.all=moderator listUsers=registered viewUser=registered +viewUserEmail=admin changeUserPassword.own=registered changeUserPassword.all=admin changeUserEmail.own=registered diff --git a/public_html/media/css/user-view.css b/public_html/media/css/user-view.css index 508d2cdb..06f7a443 100644 --- a/public_html/media/css/user-view.css +++ b/public_html/media/css/user-view.css @@ -1,5 +1,5 @@ #sidebar { - width: 200px; + width: 220px; font-size: 90%; } diff --git a/src/Models/Privilege.php b/src/Models/Privilege.php index 3c21b205..b4d429f5 100644 --- a/src/Models/Privilege.php +++ b/src/Models/Privilege.php @@ -14,6 +14,7 @@ class Privilege extends Enum const ListUsers = 11; const ViewUser = 12; + const ViewUserEmail = 22; const BanUser = 13; const AcceptUserRegistration = 14; const ChangeUserPassword = 15; diff --git a/src/Views/user-view.phtml b/src/Views/user-view.phtml index ce2b9a00..f13fd9ae 100644 --- a/src/Views/user-view.phtml +++ b/src/Views/user-view.phtml @@ -19,11 +19,11 @@ - context->user->id == $this->context->transport->user->id): ?> + context->user, Privilege::ViewUserEmail)): ?>
E-mail: -
(only you can see this) +
(only you and staff can see this)