Security: New config option to disable the use of gravatar for profile images, Closes #1891

This commit is contained in:
Torkel Ödegaard
2015-05-01 08:40:13 +02:00
parent 59fcd3914d
commit 5de9230924
8 changed files with 19 additions and 2 deletions

View File

@@ -25,6 +25,10 @@ func setIndexViewData(c *middleware.Context) error {
IsGrafanaAdmin: c.IsGrafanaAdmin,
}
if setting.DisableGravatar {
currentUser.GravatarUrl = setting.AppSubUrl + "/img/user_profile.png"
}
if len(currentUser.Name) == 0 {
currentUser.Name = currentUser.Login
}