repo/setting: fix admin cannot transfer organizational repository

pull/4264/head
Unknwon 2017-03-07 18:51:24 -05:00
parent d1f0bc48ce
commit 6c3424dc3f
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
1 changed files with 1 additions and 1 deletions

View File

@ -199,7 +199,7 @@ func SettingsPost(ctx *context.Context, f form.RepoSetting) {
return return
} }
if ctx.Repo.Owner.IsOrganization() { if ctx.Repo.Owner.IsOrganization() && !ctx.User.IsAdmin {
if !ctx.Repo.Owner.IsOwnedBy(ctx.User.ID) { if !ctx.Repo.Owner.IsOwnedBy(ctx.User.ID) {
ctx.Error(404) ctx.Error(404)
return return