mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-01 04:12:10 +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:
parent
2c9dd71140
commit
f6bec85296
8 changed files with 113 additions and 69 deletions
|
@ -115,7 +115,7 @@ func Dashboard(ctx *context.Context) {
|
|||
// no heatmap access for admins; GetUserHeatmapDataByUser ignores the calling user
|
||||
// so everyone would get the same empty heatmap
|
||||
if setting.Service.EnableUserHeatmap && !ctxUser.KeepActivityPrivate {
|
||||
data, err := models.GetUserHeatmapDataByUser(ctxUser)
|
||||
data, err := models.GetUserHeatmapDataByUser(ctxUser, ctx.User)
|
||||
if err != nil {
|
||||
ctx.ServerError("GetUserHeatmapDataByUser", err)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue