aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorBwko <bouwko@gmail.com>2017-01-23 02:19:50 +0100
committerLunny Xiao <xiaolunwen@gmail.com>2017-01-23 09:19:50 +0800
commit74ed6dc3ad830d308a032fe213e9dfe83f954ffc (patch)
tree7b1af731b492d46785d162ca778e1b756b45850f /models
parent1257d43e147efd985e740e0ec59f2e5b015e5b7d (diff)
downloadgitea-74ed6dc3ad830d308a032fe213e9dfe83f954ffc.tar.gz
gitea-74ed6dc3ad830d308a032fe213e9dfe83f954ffc.zip
Add option to app.ini to enable local import paths (#724)
Diffstat (limited to 'models')
-rw-r--r--models/user.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/models/user.go b/models/user.go
index 86573dbda4..306b695bf3 100644
--- a/models/user.go
+++ b/models/user.go
@@ -233,6 +233,9 @@ func (u *User) CanEditGitHook() bool {
// CanImportLocal returns true if user can migrate repository by local path.
func (u *User) CanImportLocal() bool {
+ if !setting.ImportLocalPaths {
+ return false
+ }
return u.IsAdmin || u.AllowImportLocal
}