mirror of
https://github.com/go-gitea/gitea.git
synced 2025-06-23 06:28:01 +02:00
#1575 Limit repo creation
This commit is contained in:
@ -98,6 +98,7 @@ var (
|
||||
Repository struct {
|
||||
AnsiCharset string
|
||||
ForcePrivate bool
|
||||
MaxCreationLimit int
|
||||
PullRequestQueueLength int
|
||||
}
|
||||
RepoRootPath string
|
||||
@ -379,9 +380,9 @@ func NewContext() {
|
||||
RepoRootPath = path.Clean(RepoRootPath)
|
||||
}
|
||||
ScriptType = sec.Key("SCRIPT_TYPE").MustString("bash")
|
||||
Repository.AnsiCharset = sec.Key("ANSI_CHARSET").String()
|
||||
Repository.ForcePrivate = sec.Key("FORCE_PRIVATE").MustBool()
|
||||
Repository.PullRequestQueueLength = sec.Key("PULL_REQUEST_QUEUE_LENGTH").MustInt(10000)
|
||||
if err = Cfg.Section("repository").MapTo(&Repository); err != nil {
|
||||
log.Fatal(4, "Fail to map Repository settings: %v", err)
|
||||
}
|
||||
|
||||
// UI settings.
|
||||
sec = Cfg.Section("ui")
|
||||
|
Reference in New Issue
Block a user