summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/user
diff options
context:
space:
mode:
authorNorwin <noerw@users.noreply.github.com>2020-12-22 02:53:37 +0000
committerGitHub <noreply@github.com>2020-12-22 03:53:37 +0100
commitf6bec8529697bdb89ebcd0901ba093f06aa9ac46 (patch)
treed742367805a8296411211d5157c505f252f24dbf /routers/api/v1/user
parent2c9dd71140474b1f83f068bece40b25e94240ab4 (diff)
downloadgitea-f6bec8529697bdb89ebcd0901ba093f06aa9ac46.tar.gz
gitea-f6bec8529697bdb89ebcd0901ba093f06aa9ac46.zip
rework heatmap permissions (#14080)
* now uses the same permission model as for the activity feed: only include activities in repos, that the doer has access to. this might be somewhat slower. * also improves handling of user.KeepActivityPrivate (still shows the heatmap to self & admins) * extend tests * adjust integration test to new behaviour * add access to actions for admins * extend heatmap unit tests
Diffstat (limited to 'routers/api/v1/user')
-rw-r--r--routers/api/v1/user/user.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/user/user.go b/routers/api/v1/user/user.go
index b552c1353a..07d5e9112b 100644
--- a/routers/api/v1/user/user.go
+++ b/routers/api/v1/user/user.go
@@ -166,7 +166,7 @@ func GetUserHeatmapData(ctx *context.APIContext) {
return
}
- heatmap, err := models.GetUserHeatmapDataByUser(user)
+ heatmap, err := models.GetUserHeatmapDataByUser(user, ctx.User)
if err != nil {
ctx.Error(http.StatusInternalServerError, "GetUserHeatmapDataByUser", err)
return