1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

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
This commit is contained in:
Norwin
2020-12-22 02:53:37 +00:00
committed by GitHub
parent 2c9dd71140
commit f6bec85296
8 changed files with 113 additions and 69 deletions

View File

@@ -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