File tree 3 files changed +4
-4
lines changed
3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -308,7 +308,7 @@ func Profile(ctx *context.Context) {
308
308
ctx .Data ["IsPackageEnabled" ] = setting .Packages .Enabled
309
309
ctx .Data ["IsRepoIndexerEnabled" ] = setting .Indexer .RepoIndexerEnabled
310
310
311
- ctx .Data ["ShowUserEmail" ] = len ( ctx .ContextUser .Email ) > 0 && ctx .IsSigned && ( ! ctx .ContextUser .KeepEmailPrivate || ctx . ContextUser . ID == ctx . Doer . ID )
311
+ ctx .Data ["ShowUserEmail" ] = setting . UI . ShowUserEmail && ctx .ContextUser .Email != "" && ctx .IsSigned && ! ctx .ContextUser .KeepEmailPrivate
312
312
313
313
ctx .HTML (http .StatusOK , tplProfile )
314
314
}
Original file line number Diff line number Diff line change 4
4
<div class="ui stackable grid">
5
5
<div class="ui five wide column">
6
6
<div class="ui card">
7
- <div id="profile-avatar" class="content gt-df"/ >
7
+ <div id="profile-avatar" class="content gt-df">
8
8
{{if eq .SignedUserName .Owner.Name}}
9
9
<a class="image" href="{{AppSubUrl}}/user/settings" data-tooltip-content="{{.locale.Tr "user.change_avatar"}}">
10
10
{{avatar $.Context .Owner 290}}
Original file line number Diff line number Diff line change @@ -61,8 +61,8 @@ func TestSettingShowUserEmailProfile(t *testing.T) {
61
61
req = NewRequest (t , "GET" , "/user2" )
62
62
resp = session .MakeRequest (t , req , http .StatusOK )
63
63
htmlDoc = NewHTMLParser (t , resp .Body )
64
- // Should contain since this user owns the profile page
65
- assert .Contains (t ,
64
+ // Should not contain even if the user visits their own profile page
65
+ assert .NotContains (t ,
66
66
htmlDoc .doc .Find (".user.profile" ).Text (),
67
67
"user2@example.com" ,
68
68
)
You can’t perform that action at this time.
0 commit comments