Merge pull request #50 from 0xbaadf00d/feature/2583-disablehttpcloning
Disable HTTP cloning
This commit is contained in:
commit
be5607e510
7 changed files with 40 additions and 12 deletions
|
@ -254,6 +254,7 @@ func RepoAssignment(args ...bool) macaron.Handler {
|
|||
ctx.Data["IsRepositoryWriter"] = ctx.Repo.IsWriter()
|
||||
|
||||
ctx.Data["DisableSSH"] = setting.SSH.Disabled
|
||||
ctx.Data["DisableHTTP"] = setting.Repository.DisableHTTPGit
|
||||
ctx.Data["CloneLink"] = repo.CloneLink()
|
||||
ctx.Data["WikiCloneLink"] = repo.WikiCloneLink()
|
||||
|
||||
|
|
|
@ -117,6 +117,7 @@ var (
|
|||
MirrorQueueLength int
|
||||
PullRequestQueueLength int
|
||||
PreferredLicenses []string
|
||||
DisableHTTPGit bool
|
||||
|
||||
// Repository editor settings
|
||||
Editor struct {
|
||||
|
@ -491,6 +492,7 @@ func NewContext() {
|
|||
|
||||
// Determine and create root git repository path.
|
||||
sec = Cfg.Section("repository")
|
||||
Repository.DisableHTTPGit = sec.Key("DISABLE_HTTP_GIT").MustBool()
|
||||
RepoRootPath = sec.Key("ROOT").MustString(path.Join(homeDir, "gogs-repositories"))
|
||||
forcePathSeparator(RepoRootPath)
|
||||
if !filepath.IsAbs(RepoRootPath) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue