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:
@@ -609,7 +609,7 @@ func SettingsPost(ctx *context.Context) {
|
||||
}
|
||||
|
||||
if !ctx.Repo.Owner.CanCreateRepo() {
|
||||
maxCreationLimit := ctx.User.MaxCreationLimit()
|
||||
maxCreationLimit := ctx.Repo.Owner.MaxCreationLimit()
|
||||
if maxCreationLimit == 1 {
|
||||
ctx.Flash.Error(ctx.Tr("repo.form.reach_limit_of_creation_1", maxCreationLimit))
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user