Add option to app.ini to enable local import paths (#724)

This commit is contained in:
Bwko 2017-01-23 02:19:50 +01:00 committed by Lunny Xiao
parent 1257d43e14
commit 74ed6dc3ad
6 changed files with 14 additions and 5 deletions

View file

@ -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
}