1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-29 21:58:36 +00:00

Show private heatmap on profile to self & admins (#14881)

followup to #14080
This commit is contained in:
Norwin
2021-03-04 22:59:13 +00:00
committed by GitHub
parent 11229ca539
commit 0a8a3ab0f5
3 changed files with 8 additions and 15 deletions

View File

@@ -99,9 +99,7 @@ func Profile(ctx *context.Context) {
ctx.Data["Owner"] = ctxUser
ctx.Data["OpenIDs"] = openIDs
// no heatmap access for admins; GetUserHeatmapDataByUser ignores the calling user
// so everyone would get the same empty heatmap
if setting.Service.EnableUserHeatmap && !ctxUser.KeepActivityPrivate {
if setting.Service.EnableUserHeatmap {
data, err := models.GetUserHeatmapDataByUser(ctxUser, ctx.User)
if err != nil {
ctx.ServerError("GetUserHeatmapDataByUser", err)