1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-08-01 17:38:33 +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:
Gusted 2022-01-02 02:38:07 +00:00 committed by GitHub
parent 5d4ee44ed3
commit 88da7a7174
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -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 {