0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-24 00:03:11 -05:00
This commit is contained in:
Unknwon 2014-12-16 20:47:10 -05:00
parent 1a5aa5e0c0
commit d01f2f3c22

View file

@ -198,6 +198,15 @@ func Profile(ctx *middleware.Context) {
} }
feeds := make([]*models.Action, 0, len(actions)) feeds := make([]*models.Action, 0, len(actions))
for _, act := range actions { for _, act := range actions {
if act.IsPrivate {
if !ctx.IsSigned {
continue
}
if has, _ := models.HasAccess(ctx.User.Name, act.RepoUserName+"/"+act.RepoName,
models.READABLE); !has {
continue
}
}
// FIXME: cache results? // FIXME: cache results?
u, err := models.GetUserByName(act.ActUserName) u, err := models.GetUserByName(act.ActUserName)
if err != nil { if err != nil {