Make Gitlab::CurrentSettings available when getting settings

This commit is contained in:
Sean McGivern 2017-09-01 16:20:49 +01:00 committed by James Edwards-Jones
parent d2f4e8f97d
commit 01319e5933
1 changed files with 8 additions and 8 deletions

View File

@ -391,6 +391,14 @@ module Gitlab
File.join(gitlab_shell_path, 'bin', 'gitlab-keys')
end
def authorized_keys_enabled?
# Return true if nil to ensure the authorized_keys methods work while
# fixing the authorized_keys file during migration.
return true if Gitlab::CurrentSettings.current_application_settings.authorized_keys_enabled.nil?
Gitlab::CurrentSettings.current_application_settings.authorized_keys_enabled
end
private
def gitlab_projects(shard_path, disk_path)
@ -468,13 +476,5 @@ module Gitlab
# need to do the same here...
raise Error, e
end
def authorized_keys_enabled?
# Return true if nil to ensure the authorized_keys methods work while
# fixing the authorized_keys file during migration.
return true if current_application_settings.authorized_keys_enabled.nil?
current_application_settings.authorized_keys_enabled
end
end
end