diff options
author | Unknwon <joe2010xtmf@163.com> | 2014-12-12 20:30:32 -0500 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2014-12-12 20:30:32 -0500 |
commit | ac4a10456ea4515091c3c90a83a82c1e59cdf428 (patch) | |
tree | db68f1f7a8f290322bd4da9892487cca5a1a5843 /modules/middleware/repo.go | |
parent | 2f3a7e53cb58e922055baf3cf14138100a1f05ac (diff) | |
download | gitea-ac4a10456ea4515091c3c90a83a82c1e59cdf428.tar.gz gitea-ac4a10456ea4515091c3c90a83a82c1e59cdf428.zip |
api: able to create repo and fix #726
- POST /user/repos
- POST /org/:org/repos
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 8b0f0c59f7..1716194925 100644 --- a/modules/middleware/repo.go +++ b/modules/middleware/repo.go @@ -55,7 +55,7 @@ func ApiRepoAssignment() macaron.Handler { ctx.Repo.Owner = u // Organization owner team members are true owners as well. - if ctx.IsSigned && ctx.Repo.Owner.IsOrganization() && ctx.Repo.Owner.IsOrgOwner(ctx.User.Id) { + if ctx.IsSigned && ctx.Repo.Owner.IsOrganization() && ctx.Repo.Owner.IsOwnedBy(ctx.User.Id) { ctx.Repo.IsTrueOwner = true } @@ -280,7 +280,7 @@ func RepoAssignment(redirect bool, args ...bool) macaron.Handler { ctx.Repo.Owner = u // Organization owner team members are true owners as well. - if ctx.IsSigned && ctx.Repo.Owner.IsOrganization() && ctx.Repo.Owner.IsOrgOwner(ctx.User.Id) { + if ctx.IsSigned && ctx.Repo.Owner.IsOrganization() && ctx.Repo.Owner.IsOwnedBy(ctx.User.Id) { ctx.Repo.IsTrueOwner = true } |