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

Merge branch 'remove-ci-guard-for-catalog-resources-scope-ff' into 'master'

Remove ci_guard_for_catalog_resources ff

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



Merged-by: default avatarAvielle Wolfe <awolfe@gitlab.com>
Approved-by: default avatarAvielle Wolfe <awolfe@gitlab.com>
Co-authored-by: default avatarLaura Montemayor <lmontemayor@gitlab.com>
No related branches found
No related tags found
无相关合并请求
...@@ -48,7 +48,7 @@ def by_search(relation, search) ...@@ -48,7 +48,7 @@ def by_search(relation, search)
end end
def by_scope(relation, scope) def by_scope(relation, scope)
if scope == :namespaces && Feature.enabled?(:ci_guard_for_catalog_resource_scope, current_user) if scope == :namespaces
relation.visible_to_user(current_user) relation.visible_to_user(current_user)
else else
relation.public_or_visible_to_user(current_user) relation.public_or_visible_to_user(current_user)
......
---
name: ci_guard_for_catalog_resource_scope
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/137015
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/432219
milestone: '16.7'
type: development
group: group::pipeline authoring
default_enabled: true
...@@ -85,17 +85,6 @@ ...@@ -85,17 +85,6 @@
end end
end end
context 'and the ci_guard_for_catalog_resource_scope FF is disabled' do
before do
stub_feature_flags(ci_guard_for_catalog_resource_scope: false)
end
it 'returns all the catalog resources' do
expect(result.items.count).to be(3)
expect(result.items.pluck(:name)).to contain_exactly('public', 'internal', 'z private test')
end
end
context 'when the scope is invalid' do context 'when the scope is invalid' do
let(:scope) { 'INVALID' } let(:scope) { 'INVALID' }
......
...@@ -74,23 +74,9 @@ ...@@ -74,23 +74,9 @@
let(:params) { { scope: :namespaces } } let(:params) { { scope: :namespaces } }
context 'when the `ci_guard_query_for_catalog_resource_scope` ff is enabled' do it "returns the catalog resources belonging to the user's authorized namespaces" do
it "returns the catalog resources belonging to the user's authorized namespaces" do is_expected.to contain_exactly(public_resource_a, public_resource_b, internal_resource,
is_expected.to contain_exactly(public_resource_a, public_resource_b, internal_resource, private_namespace_resource)
private_namespace_resource)
end
end
context 'when the `ci_guard_query_for_catalog_resource_scope` ff is disabled' do
before do
stub_feature_flags(ci_guard_for_catalog_resource_scope: false)
end
it 'returns all resources visible to the current user' do
is_expected.to contain_exactly(
public_resource_a, public_resource_b, private_namespace_resource,
internal_resource)
end
end end
end end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册