summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-12-16 20:47:10 -0500
committerUnknwon <joe2010xtmf@163.com>2014-12-16 20:47:10 -0500
commitd01f2f3c22648490aa96227762afae16bb505952 (patch)
treecd9401212e276f76738b8c848c2b7a1195da70f3
parent1a5aa5e0c09fd8ad98f7c2dd33a594707cf1dc59 (diff)
downloadgitea-d01f2f3c22648490aa96227762afae16bb505952.tar.gz
gitea-d01f2f3c22648490aa96227762afae16bb505952.zip
fix #751
-rw-r--r--routers/user/home.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/routers/user/home.go b/routers/user/home.go
index 83dcb975fe..f5f6ab9422 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 {