Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-02-09 18:09:39 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-09 18:09:39 +0300
commit6c5f3e7b4eaf92ccdd8f2e5b6204683441e207ec (patch)
tree403601fd5d8bcc8db75c2090af1f5e0b43e666d3 /lib/gitlab/git_access.rb
parent3c53fbc50bf8d084f1184836468850d2a83ef920 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/git_access.rb')
-rw-r--r--lib/gitlab/git_access.rb26
1 files changed, 0 insertions, 26 deletions
diff --git a/lib/gitlab/git_access.rb b/lib/gitlab/git_access.rb
index e0b145f69aa..cc1f2fbd029 100644
--- a/lib/gitlab/git_access.rb
+++ b/lib/gitlab/git_access.rb
@@ -77,7 +77,6 @@ module Gitlab
check_authentication_abilities!
check_command_disabled!
check_command_existence!
- check_otp_session!
custom_action = check_custom_action
return custom_action if custom_action
@@ -255,31 +254,6 @@ module Gitlab
end
end
- def check_otp_session!
- return unless ssh?
- return if !key? || deploy_key?
- return unless Feature.enabled?(:two_factor_for_cli)
- return unless user.two_factor_enabled?
-
- if ::Gitlab::Auth::Otp::SessionEnforcer.new(actor).access_restricted?
- message = "OTP verification is required to access the repository.\n\n"\
- " Use: #{build_ssh_otp_verify_command}"
-
- raise ForbiddenError, message
- end
- end
-
- def build_ssh_otp_verify_command
- user = "#{Gitlab.config.gitlab_shell.ssh_user}@" unless Gitlab.config.gitlab_shell.ssh_user.empty?
- user_host = "#{user}#{Gitlab.config.gitlab_shell.ssh_host}"
-
- if Gitlab.config.gitlab_shell.ssh_port != 22
- "ssh #{user_host} -p #{Gitlab.config.gitlab_shell.ssh_port} 2fa_verify"
- else
- "ssh #{user_host} 2fa_verify"
- end
- end
-
def check_db_accessibility!
return unless receive_pack?