aboutsummaryrefslogtreecommitdiff
path: root/routers
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-06-05 17:11:57 -0400
committerUnknwon <u@gogs.io>2017-06-05 17:11:57 -0400
commitc0be05554152f596e94df474799a620637943a87 (patch)
tree95d97968973bcbfd5d09b9ce249cd475f945fb33 /routers
parent51d7f1264bc39a75b4fb016bee7d0f87f8485f3f (diff)
api/repo: fix admin migrate repo for non-org users (#4479)
Diffstat (limited to 'routers')
-rw-r--r--routers/api/v1/repo/repo.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go
index 1095f08d..b4be4247 100644
--- a/routers/api/v1/repo/repo.go
+++ b/routers/api/v1/repo/repo.go
@@ -220,7 +220,7 @@ func Migrate(c *context.APIContext, f form.MigrateRepo) {
c.Error(500, "GetUserByID", err)
}
return
- } else if !org.IsOrganization() {
+ } else if !org.IsOrganization() && !c.User.IsAdmin {
c.Error(403, "", "Given user is not an organization")
return
}