Parcourir la source

repo/setting: fix admin cannot transfer organizational repository

Unknwon il y a 8 ans
Parent
commit
6c3424dc3f
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      routers/repo/setting.go

+ 1 - 1
routers/repo/setting.go

@@ -199,7 +199,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