api/repo: fix admin migrate repo for non-org users (#4479)

pull/4551/head
Unknwon 2017-06-05 17:11:57 -04:00
parent 51d7f1264b
commit c0be055541
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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
}

View File

@ -1 +1 @@
0.11.15.0605
0.11.16.0605