diff options
author | Unknown <joe2010xtmf@163.com> | 2014-05-13 19:26:13 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-05-13 19:26:13 -0400 |
commit | 33ec0632ffd9e770793eba57393f27385d5f392d (patch) | |
tree | 9570ef3f10b5febed8158999ce01176ffd18c0fd /modules | |
parent | f276b37bbbb2fbfb8fd1bcaf7dfff5715861e81c (diff) | |
download | gitea-33ec0632ffd9e770793eba57393f27385d5f392d.tar.gz gitea-33ec0632ffd9e770793eba57393f27385d5f392d.zip |
Fix #183
Diffstat (limited to 'modules')
-rw-r--r-- | modules/middleware/repo.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go index bfb1e69da8..cd43539122 100644 --- a/modules/middleware/repo.go +++ b/modules/middleware/repo.go @@ -99,6 +99,11 @@ func RepoAssignment(redirect bool, args ...bool) martini.Handler { return } + // Check if the mirror repository owner(mirror repository doesn't have access). + if !ctx.Repo.IsOwner && repo.OwnerId == ctx.User.Id { + ctx.Repo.IsOwner = true + } + // Check access. if repo.IsPrivate && !ctx.Repo.IsOwner { if ctx.User == nil { |