diff options
author | Gusted <williamzijl7@hotmail.com> | 2022-01-02 02:38:07 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-02 02:38:07 +0000 |
commit | 88da7a7174f9c1568cc2d8d084d6b05a8d268690 (patch) | |
tree | aa6d343a5f02531f1f09f728ea21ea894f9076dc /routers/web/repo/migrate.go | |
parent | 5d4ee44ed3489df04854478b1f5a3d9870beb58e (diff) | |
download | gitea-88da7a7174f9c1568cc2d8d084d6b05a8d268690.tar.gz gitea-88da7a7174f9c1568cc2d8d084d6b05a8d268690.zip |
Use correct user when determining max repo limits for error messages (#18153)
- Use the correct user(`owner` instead of `ctx.User`) to get the maxCreationLimit.
Diffstat (limited to 'routers/web/repo/migrate.go')
-rw-r--r-- | routers/web/repo/migrate.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/repo/migrate.go b/routers/web/repo/migrate.go index 9b12653839..1bbb192b24 100644 --- a/routers/web/repo/migrate.go +++ b/routers/web/repo/migrate.go @@ -82,7 +82,7 @@ func handleMigrateError(ctx *context.Context, owner *user_model.User, err error, ctx.RenderWithErr(ctx.Tr("form.2fa_auth_required"), tpl, form) case repo_model.IsErrReachLimitOfRepo(err): var msg string - maxCreationLimit := ctx.User.MaxCreationLimit() + maxCreationLimit := owner.MaxCreationLimit() if maxCreationLimit == 1 { msg = ctx.Tr("repo.form.reach_limit_of_creation_1", maxCreationLimit) } else { |