diff options
author | Kim "BKC" Carlbäcker <kim.carlbacker@gmail.com> | 2016-01-20 14:46:45 +0100 |
---|---|---|
committer | Kim "BKC" Carlbäcker <kim.carlbacker@gmail.com> | 2016-01-20 14:46:45 +0100 |
commit | a3eab8185df5f1522f6d3bc3ed2d62eef4617e54 (patch) | |
tree | d69f33dcb92b916e9d02c5f96980ce7a39137bd7 /routers | |
parent | 7ef9a055886574655d9f2be70c957bc16bf30500 (diff) | |
download | gitea-a3eab8185df5f1522f6d3bc3ed2d62eef4617e54.tar.gz gitea-a3eab8185df5f1522f6d3bc3ed2d62eef4617e54.zip |
Admins are allowed to create repos for arbitrary Orgs
Diffstat (limited to 'routers')
-rw-r--r-- | routers/repo/repo.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go index d60ec68834..d4af0babc0 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -57,7 +57,7 @@ func checkContextUser(ctx *middleware.Context, uid int64) *models.User { } // Check ownership of organization. - if !org.IsOrganization() || !org.IsOwnedBy(ctx.User.Id) { + if !org.IsOrganization() || !(ctx.User.IsAdmin || org.IsOwnedBy(ctx.User.Id)) { ctx.Error(403) return nil } |