Show private heatmap on profile to self & admins (#14881)
followup to #14080
This commit is contained in:
parent
11229ca539
commit
0a8a3ab0f5
3 changed files with 8 additions and 15 deletions
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue