Преглед на файлове

Site admin could create repos even MAX_CREATION_LIMIT=0 (#4645)

* site admin could create repos even MAX_CREATION_LIMIT=0

* Optimize if structure
tags/v1.6.0-dev
Lunny Xiao преди 5 години
родител
ревизия
578cf52ce5
No account linked to committer's email address
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1
    1
      models/repo.go

+ 1
- 1
models/repo.go Целия файл

@@ -1411,7 +1411,7 @@ func createRepository(e *xorm.Session, doer, u *User, repo *Repository) (err err

// CreateRepository creates a repository for the user/organization u.
func CreateRepository(doer, u *User, opts CreateRepoOptions) (_ *Repository, err error) {
if !u.CanCreateRepo() {
if !doer.IsAdmin && !u.CanCreateRepo() {
return nil, ErrReachLimitOfRepo{u.MaxRepoCreation}
}


Loading…
Отказ
Запис