Browse Source

repo/setting: fix admin cannot transfer organizational repository

pull/4264/head
Unknwon 8 years ago
parent
commit
6c3424dc3f
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
  1. 2
      routers/repo/setting.go

2
routers/repo/setting.go

@ -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

Loading…
Cancel
Save