diff options
author | Lanre Adelowo <adelowomailbox@gmail.com> | 2019-02-19 15:11:50 +0100 |
---|---|---|
committer | techknowlogick <matti@mdranta.net> | 2019-02-19 09:11:50 -0500 |
commit | 094263db4d9f1b53c4b4c021005eec07baddd253 (patch) | |
tree | 69d47554792a96e3dd13fdfd8c28cfb30ac462f8 /templates | |
parent | ff2be17e3f2e4cf8e756796574cdd72d349fa19b (diff) | |
download | gitea-094263db4d9f1b53c4b4c021005eec07baddd253.tar.gz gitea-094263db4d9f1b53c4b4c021005eec07baddd253.zip |
Show email if the authenticated user owns the profile page being requested for (#4981)
* Show email if the authenticated user owns the profile page being
requested for.
Also removed `setting.UI.ShowUserEmail` as it's documentation says it
only controls the email setting on the explore page
* fix current user check... This prevents a panic as a user must be signed in before ctx.User is called
* fix panic in tests
* try to fix tests
* Update year
* Test CI fail
* Revert change
* User 3 is not allowed to authorize
* Set user2 email to be private
* Change to user4 in explore page as user2 now has private email option set
Diffstat (limited to 'templates')
-rw-r--r-- | templates/user/profile.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl index b3a500e9f6..f65776bdfa 100644 --- a/templates/user/profile.tmpl +++ b/templates/user/profile.tmpl @@ -22,7 +22,7 @@ {{if .Owner.Location}} <li><i class="octicon octicon-location"></i> {{.Owner.Location}}</li> {{end}} - {{if and $.ShowUserEmail .Owner.Email .IsSigned (not .Owner.KeepEmailPrivate)}} + {{if .ShowUserEmail }} <li> <i class="octicon octicon-mail"></i> <a href="mailto:{{.Owner.Email}}" rel="nofollow">{{.Owner.Email}}</a> |