aboutsummaryrefslogtreecommitdiff
path: root/routers/repo
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-02-22 23:16:23 -0500
committerUnknwon <u@gogs.io>2017-02-22 23:16:23 -0500
commit162504e90c7c289cf8700969c21852aeda4ab5e8 (patch)
treebf661104f0ba7668c20595fbfb35fe15a7d41eb5 /routers/repo
parent5ea0592f61f85a8a3a63326661dd31da4dd12369 (diff)
repo/setting: fix admin cannot delete organizational repository
Diffstat (limited to 'routers/repo')
-rw-r--r--routers/repo/setting.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/repo/setting.go b/routers/repo/setting.go
index d97fd63b..769794f9 100644
--- a/routers/repo/setting.go
+++ b/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