1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-07 11:07:20 +00:00

fix bool check for repo max limit and fix hang when push repo with tons of commits

This commit is contained in:
Unknwon
2015-12-10 16:27:47 -05:00
parent 0e96a46020
commit 99e9bbef6c
6 changed files with 8 additions and 9 deletions

View File

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