From 74ed6dc3ad830d308a032fe213e9dfe83f954ffc Mon Sep 17 00:00:00 2001 From: Bwko Date: Mon, 23 Jan 2017 02:19:50 +0100 Subject: Add option to app.ini to enable local import paths (#724) --- models/user.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'models') 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 } -- cgit v1.2.3