diff options
author | Unknown <joe2010xtmf@163.com> | 2014-05-08 19:17:43 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-05-08 19:17:43 -0400 |
commit | 914ffa496f8e8e9948ca8c5596da6b0d3c17555d (patch) | |
tree | 5f2fc88ee51db05013f968031bc8340f4867f48d /modules/middleware/repo.go | |
parent | a742ee543ef3faf6374625c9c6d065c0a46b5549 (diff) | |
download | gitea-914ffa496f8e8e9948ca8c5596da6b0d3c17555d.tar.gz gitea-914ffa496f8e8e9948ca8c5596da6b0d3c17555d.zip |
Show private repository activities in dashboard if has access
Diffstat (limited to 'modules/middleware/repo.go')
-rw-r--r-- | modules/middleware/repo.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go index 53d4dae4f8..4a10edf881 100644 --- a/modules/middleware/repo.go +++ b/modules/middleware/repo.go @@ -50,7 +50,7 @@ func RepoAssignment(redirect bool, args ...bool) martini.Handler { // Collaborators who have write access can be seen as owners. if ctx.IsSigned { - ctx.Repo.IsOwner, err = models.HasAccess(ctx.User.Name, repoName, models.AU_WRITABLE) + ctx.Repo.IsOwner, err = models.HasAccess(ctx.User.Name, userName+"/"+repoName, models.AU_WRITABLE) if err != nil { ctx.Handle(500, "RepoAssignment(HasAccess)", err) return @@ -100,7 +100,7 @@ func RepoAssignment(redirect bool, args ...bool) martini.Handler { } // Check access. - if repo.IsPrivate { + if repo.IsPrivate && !ctx.Repo.IsOwner { if ctx.User == nil { ctx.Handle(404, "RepoAssignment(HasAccess)", nil) return |