|
|
|
@ -81,7 +81,14 @@ func handleMigrateError(ctx *context.Context, owner *user_model.User, err error, |
|
|
|
|
case migrations.IsTwoFactorAuthError(err): |
|
|
|
|
ctx.RenderWithErr(ctx.Tr("form.2fa_auth_required"), tpl, form) |
|
|
|
|
case repo_model.IsErrReachLimitOfRepo(err): |
|
|
|
|
ctx.RenderWithErr(ctx.Tr("repo.form.reach_limit_of_creation", owner.MaxCreationLimit()), tpl, form) |
|
|
|
|
var msg string |
|
|
|
|
maxCreationLimit := ctx.User.MaxCreationLimit() |
|
|
|
|
if maxCreationLimit == 1 { |
|
|
|
|
msg = ctx.Tr("repo.form.reach_limit_of_creation_1", maxCreationLimit) |
|
|
|
|
} else { |
|
|
|
|
msg = ctx.Tr("repo.form.reach_limit_of_creation_n", maxCreationLimit) |
|
|
|
|
} |
|
|
|
|
ctx.RenderWithErr(msg, tpl, form) |
|
|
|
|
case repo_model.IsErrRepoAlreadyExist(err): |
|
|
|
|
ctx.Data["Err_RepoName"] = true |
|
|
|
|
ctx.RenderWithErr(ctx.Tr("form.repo_name_been_taken"), tpl, form) |
|
|
|
|