diff options
-rw-r--r-- | routers/user/home.go | 11 | ||||
-rw-r--r-- | templates/org/home.tmpl | 2 | ||||
-rw-r--r-- | templates/user/profile.tmpl | 2 |
3 files changed, 5 insertions, 10 deletions
diff --git a/routers/user/home.go b/routers/user/home.go index ef05be27a3..503f9e3667 100644 --- a/routers/user/home.go +++ b/routers/user/home.go @@ -194,11 +194,6 @@ func Profile(ctx *middleware.Context) { ctx.Redirect(setting.AppSubUrl + "/org/" + u.Name) return } - - // For security reason, hide e-mail address for anonymous visitors. - if !ctx.IsSigned { - u.Email = "" - } ctx.Data["Owner"] = u tab := ctx.Query("tab") @@ -262,7 +257,7 @@ func Email2User(ctx *middleware.Context) { ctx.Redirect(setting.AppSubUrl + "/user/" + u.Name) } -func Issues(ctx *middleware.Context) { +func Issues(ctx *middleware.Context) { ctx.Data["Title"] = ctx.Tr("issues") ctx.Data["PageIsDashboard"] = true ctx.Data["PageIsIssues"] = true @@ -389,8 +384,8 @@ func Issues(ctx *middleware.Context) { } else { ctx.Data["ShowCount"] = issueStats.OpenCount } - + ctx.Data["ContextUser"] = ctx.User - + ctx.HTML(200, ISSUES) } diff --git a/templates/org/home.tmpl b/templates/org/home.tmpl index fdce06a298..4301063627 100644 --- a/templates/org/home.tmpl +++ b/templates/org/home.tmpl @@ -12,7 +12,7 @@ <ul class="text-grey"> {{if .Org.Location}}<li><span class="octicon octicon-location"></span> <span>{{.Org.Location}}</span></li>{{end}} {{if .Org.Website}}<li><span class="octicon octicon-link"></span> <a target="_blank" href="{{.Org.Website}}">{{.Org.Website}}</a></li>{{end}} - {{if .Org.Email}}<li><span class="octicon octicon-mail"></span> <a href="mailto:{{.Org.Email}}">{{.Org.Email}}</a></li>{{end}} + {{if and .Org.Email .IsSigned}}<li><span class="octicon octicon-mail"></span> <a href="mailto:{{.Org.Email}}">{{.Org.Email}}</a></li>{{end}} </ul> </div> </div> diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl index dab90c35a2..c8b7c591b8 100644 --- a/templates/user/profile.tmpl +++ b/templates/user/profile.tmpl @@ -22,7 +22,7 @@ {{if .Owner.Location}} <li class="list-group-item"><i class="octicon octicon-location"></i> {{.Owner.Location}}</li> {{end}} - {{if .Owner.Email}} + {{if and .Owner.Email .IsSigned}} <li class="list-group-item"><i class="octicon octicon-mail"></i> <a href="mailto:{{.Owner.Email}}" rel="nofollow">{{.Owner.Email}}</a></li> {{end}} {{if .Owner.Website}} |