summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2017-09-01 16:20:49 +0100
committerJames Edwards-Jones <jedwardsjones@gitlab.com>2018-01-08 20:34:37 +0000
commit01319e5933314616077c6a23cceccdec6ab815af (patch)
treebbe51414987f90b110b4a2718fd12e141abddf5b
parentd2f4e8f97da171998c2bf4a88765b29528e748b7 (diff)
downloadgitlab-ce-01319e5933314616077c6a23cceccdec6ab815af.tar.gz
Make Gitlab::CurrentSettings available when getting settings
-rw-r--r--lib/gitlab/shell.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/gitlab/shell.rb b/lib/gitlab/shell.rb
index 65a9e58adf1..bbe7199c009 100644
--- a/lib/gitlab/shell.rb
+++ b/lib/gitlab/shell.rb
@@ -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