Commit 9a98dba1 authored by DJ Mountney's avatar DJ Mountney

Update ldap encrypted to use consistent wording

Use gitlab-rake for the rake commands, and always refer to LDAP in
uppercase
parent 9d6627b7
......@@ -24,7 +24,7 @@ module Gitlab
if ENV["EDITOR"].to_s.empty?
puts 'No $EDITOR specified to open file. Please provide one when running the command:'
puts 'gitlab:ldap:secret:edit EDITOR=vim'
puts 'gitlab-rake gitlab:ldap:secret:edit EDITOR=vim'
return
end
......@@ -52,7 +52,7 @@ module Gitlab
encrypted = Gitlab::Auth::Ldap::Config.encrypted_secrets
return unless validate_config(encrypted)
puts encrypted.read.presence || "File '#{encrypted.content_path}' does not exist. Use `rake gitlab:ldap:secret:edit` to change that."
puts encrypted.read.presence || "File '#{encrypted.content_path}' does not exist. Use `gitlab-rake gitlab:ldap:secret:edit` to change that."
rescue ActiveSupport::MessageEncryptor::InvalidMessage
puts "Couldn't decrypt #{encrypted.content_path}. Perhaps you passed the wrong key?"
end
......
......@@ -38,18 +38,18 @@ namespace :gitlab do
end
namespace :secret do
desc 'GitLab | LDAP | Secret | Write ldap secrets'
desc 'GitLab | LDAP | Secret | Write LDAP secrets'
task write: [:environment] do
content = STDIN.tty? ? STDIN.gets : STDIN.read
Gitlab::EncryptedLdapCommand.write(content)
end
desc 'GitLab | LDAP | Secret | Edit ldap secrets'
desc 'GitLab | LDAP | Secret | Edit LDAP secrets'
task edit: [:environment] do
Gitlab::EncryptedLdapCommand.edit
end
desc 'GitLab | LDAP | Secret | Show ldap secrets'
desc 'GitLab | LDAP | Secret | Show LDAP secrets'
task show: [:environment] do
Gitlab::EncryptedLdapCommand.show
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment