From d01f2f3c22648490aa96227762afae16bb505952 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Tue, 16 Dec 2014 20:47:10 -0500 Subject: [PATCH] fix #751 --- routers/user/home.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/routers/user/home.go b/routers/user/home.go index 83dcb975..f5f6ab94 100644 --- a/routers/user/home.go +++ b/routers/user/home.go @@ -198,6 +198,15 @@ func Profile(ctx *middleware.Context) { } feeds := make([]*models.Action, 0, len(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? u, err := models.GetUserByName(act.ActUserName) if err != nil {