aboutsummaryrefslogtreecommitdiffstats
path: root/models/user.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-12-10 16:27:47 -0500
committerUnknwon <u@gogs.io>2015-12-10 16:27:47 -0500
commit99e9bbef6c291e983ec919406ed50a91b929c34c (patch)
treee058ffae83c704edd6ff881ad78d791eb58ecbb0 /models/user.go
parent0e96a46020564af8a0061ccea09893422a48cc26 (diff)
downloadgitea-99e9bbef6c291e983ec919406ed50a91b929c34c.tar.gz
gitea-99e9bbef6c291e983ec919406ed50a91b929c34c.zip
fix bool check for repo max limit and fix hang when push repo with tons of commits
Diffstat (limited to 'models/user.go')
-rw-r--r--models/user.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/models/user.go b/models/user.go
index 2806ef64ed..8993d7de3c 100644
--- a/models/user.go
+++ b/models/user.go
@@ -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