mirror of
https://github.com/gogs/gogs.git
synced 2026-05-06 11:36:12 +02:00
repo/setting: fix admin cannot delete organizational repository
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user