mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-09-22 16:05:01 +08:00
fix bool check for repo max limit and fix hang when push repo with tons of commits
This commit is contained in:
@ -133,6 +133,9 @@ func (u *User) RepoCreationNum() int {
|
||||
|
||||
func (u *User) CanCreateRepo() bool {
|
||||
if u.MaxRepoCreation <= -1 {
|
||||
if setting.Repository.MaxCreationLimit == -1 {
|
||||
return true
|
||||
}
|
||||
return u.NumRepos < setting.Repository.MaxCreationLimit
|
||||
}
|
||||
return u.NumRepos < u.MaxRepoCreation
|
||||
|
Reference in New Issue
Block a user