diff --git a/app/models/ci/catalog/listing.rb b/app/models/ci/catalog/listing.rb index c93cb02ffc19a8f664e0fa70efc541c2eb1e83a7..e534b7d1a5c589a4fbf23d0a1741f9562b882c63 100644 --- a/app/models/ci/catalog/listing.rb +++ b/app/models/ci/catalog/listing.rb @@ -48,7 +48,7 @@ def by_search(relation, search) end 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) else relation.public_or_visible_to_user(current_user) diff --git a/config/feature_flags/development/ci_guard_for_catalog_resource_scope.yml b/config/feature_flags/development/ci_guard_for_catalog_resource_scope.yml deleted file mode 100644 index e6e816907831f2715ed05b8344f7fef013b934f7..0000000000000000000000000000000000000000 --- a/config/feature_flags/development/ci_guard_for_catalog_resource_scope.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -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 diff --git a/spec/graphql/resolvers/ci/catalog/resources_resolver_spec.rb b/spec/graphql/resolvers/ci/catalog/resources_resolver_spec.rb index 203c773e3fba5ffb3f287f0fb3cabcce71326151..f2e07a9cda91a3f7bc2531fe922477944311aea8 100644 --- a/spec/graphql/resolvers/ci/catalog/resources_resolver_spec.rb +++ b/spec/graphql/resolvers/ci/catalog/resources_resolver_spec.rb @@ -85,17 +85,6 @@ 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 let(:scope) { 'INVALID' } diff --git a/spec/models/ci/catalog/listing_spec.rb b/spec/models/ci/catalog/listing_spec.rb index b5aa6bf32fc80d97ce58cbdb537912f655167865..356a0dcee67b3c3941b00f9e481afcf0d0ce91ff 100644 --- a/spec/models/ci/catalog/listing_spec.rb +++ b/spec/models/ci/catalog/listing_spec.rb @@ -74,23 +74,9 @@ 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 - is_expected.to contain_exactly(public_resource_a, public_resource_b, internal_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 + 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, + private_namespace_resource) end end