aboutsummaryrefslogtreecommitdiffstats
path: root/routers/repo/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo/repo.go')
-rw-r--r--routers/repo/repo.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go
index b0bb608d09..4ded75db6c 100644
--- a/routers/repo/repo.go
+++ b/routers/repo/repo.go
@@ -259,6 +259,7 @@ func Migrate(ctx *context.Context) {
ctx.Data["Title"] = ctx.Tr("new_migrate")
ctx.Data["private"] = getRepoPrivate(ctx)
ctx.Data["IsForcedPrivate"] = setting.Repository.ForcePrivate
+ ctx.Data["DisableMirrors"] = setting.Repository.DisableMirrors
ctx.Data["mirror"] = ctx.Query("mirror") == "1"
ctx.Data["wiki"] = ctx.Query("wiki") == "1"
ctx.Data["milestones"] = ctx.Query("milestones") == "1"
@@ -360,7 +361,7 @@ func MigratePost(ctx *context.Context, form auth.MigrateRepoForm) {
RepoName: form.RepoName,
Description: form.Description,
Private: form.Private || setting.Repository.ForcePrivate,
- Mirror: form.Mirror,
+ Mirror: form.Mirror && !setting.Repository.DisableMirrors,
AuthUsername: form.AuthUsername,
AuthPassword: form.AuthPassword,
Wiki: form.Wiki,