diff options
author | EnricoFerro <enrico.ferro@dncsrl.com> | 2018-08-24 07:00:22 +0200 |
---|---|---|
committer | techknowlogick <techknowlogick@users.noreply.github.com> | 2018-08-24 01:00:22 -0400 |
commit | 0a24f5cac8f131d84578b0c692ee2fe81a89fba4 (patch) | |
tree | 0e03bbc9609dc3e0a6d36989297a705b1cdbd676 /modules | |
parent | 194a11eb110cd98fc2ba52861abf7770db6885a3 (diff) | |
download | gitea-0a24f5cac8f131d84578b0c692ee2fe81a89fba4.tar.gz gitea-0a24f5cac8f131d84578b0c692ee2fe81a89fba4.zip |
Disable 'May Import Local Repository' when is disabled by setting (Issue #4779) (#4780)
Diffstat (limited to 'modules')
-rw-r--r-- | modules/templates/helper.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/templates/helper.go b/modules/templates/helper.go index c3d9e8fec2..7ee68c833e 100644 --- a/modules/templates/helper.go +++ b/modules/templates/helper.go @@ -165,6 +165,9 @@ func NewFuncMap() []template.FuncMap { "DisableGitHooks": func() bool { return setting.DisableGitHooks }, + "DisableImportLocal": func() bool { + return !setting.ImportLocalPaths + }, "TrN": TrN, "Dict": func(values ...interface{}) (map[string]interface{}, error) { if len(values)%2 != 0 { |