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