From c0be05554152f596e94df474799a620637943a87 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Mon, 5 Jun 2017 17:11:57 -0400 Subject: api/repo: fix admin migrate repo for non-org users (#4479) --- routers/api/v1/repo/repo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'routers/api') 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 } -- cgit v1.2.3