diff options
author | Jonas Östanbäck <cez81@users.noreply.github.com> | 2017-05-20 05:51:19 +0200 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-05-20 11:51:19 +0800 |
commit | 80cea8747fe87db98a9e930da6d664a245e5fc12 (patch) | |
tree | ad65b28b121911bacf06f95ac07b7f6009eb5bed /models | |
parent | 977dcf96e0d9c5dded47ac6066fad8979a9f74f9 (diff) | |
download | gitea-80cea8747fe87db98a9e930da6d664a245e5fc12.tar.gz gitea-80cea8747fe87db98a9e930da6d664a245e5fc12.zip |
Admin should always be allowed to create repos even if hit limit (#1765)
Diffstat (limited to 'models')
-rw-r--r-- | models/user.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/models/user.go b/models/user.go index 7e6bbd5dc3..75329d8ff0 100644 --- a/models/user.go +++ b/models/user.go @@ -221,6 +221,9 @@ func (u *User) RepoCreationNum() int { // CanCreateRepo returns if user login can create a repository func (u *User) CanCreateRepo() bool { + if u.IsAdmin { + return true + } if u.MaxRepoCreation <= -1 { if setting.Repository.MaxCreationLimit <= -1 { return true |