From ae319da5fd91c102b387296f9884401e120f9b79 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 26 Jan 2017 17:43:37 -0500 Subject: Disable local path migration by default (#4033) Site admin now has to enable manually by config option [repository] ENABLE_LOCAL_PATH_MIGRATION = true. Site admin always grants this permission, but regulars users have to be allowed by site admins in admin user panel. --- models/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'models') diff --git a/models/user.go b/models/user.go index 4b842339..f01f8b2a 100644 --- a/models/user.go +++ b/models/user.go @@ -176,7 +176,7 @@ func (u *User) CanEditGitHook() bool { // CanImportLocal returns true if user can migrate repository by local path. func (u *User) CanImportLocal() bool { - return u.IsAdmin || u.AllowImportLocal + return setting.Repository.EnableLocalPathMigration && (u.IsAdmin || u.AllowImportLocal) } // DashboardLink returns the user dashboard page link. -- cgit v1.2.3