diff options
author | Unknwon <u@gogs.io> | 2017-06-05 17:11:57 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-06-05 17:11:57 -0400 |
commit | c0be05554152f596e94df474799a620637943a87 (patch) | |
tree | 95d97968973bcbfd5d09b9ce249cd475f945fb33 | |
parent | 51d7f1264bc39a75b4fb016bee7d0f87f8485f3f (diff) |
api/repo: fix admin migrate repo for non-org users (#4479)
-rw-r--r-- | gogs.go | 2 | ||||
-rw-r--r-- | routers/api/v1/repo/repo.go | 2 | ||||
-rw-r--r-- | templates/.VERSION | 2 |
3 files changed, 3 insertions, 3 deletions
@@ -16,7 +16,7 @@ import ( "github.com/gogits/gogs/pkg/setting" ) -const APP_VER = "0.11.15.0605" +const APP_VER = "0.11.16.0605" func init() { setting.AppVer = APP_VER 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 } diff --git a/templates/.VERSION b/templates/.VERSION index 460b530d..250a5040 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.11.15.0605
\ No newline at end of file +0.11.16.0605
\ No newline at end of file |