summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorNorwin <noerw@users.noreply.github.com>2021-03-04 22:59:13 +0000
committerGitHub <noreply@github.com>2021-03-04 23:59:13 +0100
commit0a8a3ab0f5b46cc5280976c07a16d8721186f9f6 (patch)
tree92b97a65595dc2752c8a9908fb4aab0c176a3492 /routers
parent11229ca53990fcb163b35295a2300daaf3ba7f47 (diff)
downloadgitea-0a8a3ab0f5b46cc5280976c07a16d8721186f9f6.tar.gz
gitea-0a8a3ab0f5b46cc5280976c07a16d8721186f9f6.zip
Show private heatmap on profile to self & admins (#14881)
followup to #14080
Diffstat (limited to 'routers')
-rw-r--r--routers/user/home.go4
-rw-r--r--routers/user/profile.go4
2 files changed, 2 insertions, 6 deletions
diff --git a/routers/user/home.go b/routers/user/home.go
index 9957ec6b02..886c4ab1ba 100644
--- a/routers/user/home.go
+++ b/routers/user/home.go
@@ -104,9 +104,7 @@ func Dashboard(ctx *context.Context) {
ctx.Data["PageIsNews"] = true
ctx.Data["SearchLimit"] = setting.UI.User.RepoPagingNum
- // 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.GetUserHeatmapDataByUserTeam(ctxUser, ctx.Org.Team, ctx.User)
if err != nil {
ctx.ServerError("GetUserHeatmapDataByUserTeam", err)
diff --git a/routers/user/profile.go b/routers/user/profile.go
index 5dfee07d76..ea4a1e8893 100644
--- a/routers/user/profile.go
+++ b/routers/user/profile.go
@@ -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)