repo/setting: fix admin cannot delete organizational repository

pull/3854/merge
Unknwon 2017-02-22 23:16:23 -05:00
parent 5ea0592f61
commit 162504e90c
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
1 changed files with 1 additions and 1 deletions

View File

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