Browse Source

Admin should always be allowed to create repos even if hit limit (#1765)

release/v1.2
Jonas Östanbäck 6 years ago
committed by Lunny Xiao
parent
commit
80cea8747f
  1. 3
      models/user.go

3
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

Loading…
Cancel
Save