diff options
author | Unknwon <u@gogs.io> | 2017-01-26 17:43:37 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-01-26 17:43:37 -0500 |
commit | ae319da5fd91c102b387296f9884401e120f9b79 (patch) | |
tree | 82876db589f1f15d0b2d6cf7790f8a3f06f0c14f /models | |
parent | 6d6848af5c8b3188dd538299fa6d50073c8d8153 (diff) |
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.
Diffstat (limited to 'models')
-rw-r--r-- | models/user.go | 2 |
1 files changed, 1 insertions, 1 deletions
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. |