mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
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.
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user