فهرست منبع

repo/setting: fix admin cannot delete organizational repository

Unknwon 8 سال پیش
والد
کامیت
162504e90c
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      routers/repo/setting.go

+ 1 - 1
routers/repo/setting.go

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