Skip to content
代码片段 群组 项目
未验证 提交 f2013ba2 编辑于 作者: Vasilii Iakliushin's avatar Vasilii Iakliushin 提交者: GitLab
浏览文件

Merge branch '496539_remove_ff' into 'master'

Remove `go_get_handle_401_error` feature flag

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/168338



Merged-by: default avatarVasilii Iakliushin <viakliushin@gitlab.com>
Approved-by: default avatarGavin Hinfey <ghinfey@gitlab.com>
No related branches found
No related tags found
无相关合并请求
---
name: go_get_handle_401_error
feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/493732
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/167640
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/496539
milestone: '17.5'
group: group::source code
type: gitlab_com_derisk
default_enabled: false
......@@ -130,10 +130,7 @@ def project_for_path(path_info)
# can_read_project? checks if the request's credentials have read access to the project
def can_read_project?(request, project)
return true if project.public?
if Feature.enabled?(:go_get_handle_401_error, Feature.current_request) && !has_basic_credentials?(request)
return false
end
return false unless has_basic_credentials?(request)
login, password = user_name_and_password(request)
auth_result = Gitlab::Auth.find_for_git_client(login, password, project: project, request: request)
......
......@@ -69,17 +69,6 @@
it 'returns the 2-segment path' do
expect_response_with_path(go, enabled_protocol, project.full_path)
end
context 'when "go_get_handle_401_error" feature flag disabled' do
before do
stub_feature_flags(go_get_handle_401_error: false)
end
it 'returns 401 error response' do
response = go
expect(response[0]).to eq(401)
end
end
end
end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册