Explorar o código

repo/setting: fix admin cannot delete organizational repository wiki

Unknwon %!s(int64=8) %!d(string=hai) anos
pai
achega
d1f0bc48ce
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      routers/repo/setting.go

+ 1 - 1
routers/repo/setting.go

@@ -264,7 +264,7 @@ func SettingsPost(ctx *context.Context, f form.RepoSetting) {
 			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