Commit fbe83054 authored by Alex Kalderimis's avatar Alex Kalderimis

Remove graphql_lazy_authorization feature flag

This removes the flag that controlled conditional laziness in graphql
authorization.
parent e3ddd72e
---
title: Remove graphql_lazy_authorization feature flag
merge_request: 46819
author:
type: added
---
name: graphql_lazy_authorization
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/45263
rollout_issue_url:
type: development
group: group::plan
default_enabled: false
......@@ -36,11 +36,7 @@ module Gitlab
end
def self.with_value(unforced, &block)
if Feature.enabled?(:graphql_lazy_authorization)
self.new { unforced }.then(&block)
else
block.call(unforced)
end
self.new { unforced }.then(&block)
end
end
end
......
......@@ -45,7 +45,7 @@ RSpec.describe Gitlab::Graphql::Authorize::AuthorizeFieldService do
let(:type_instance) { type_class.authorized_new(presented_object, context) }
let(:field) { type_class.fields['testField'].to_graphql }
subject(:resolved) { resolve&.force }
subject(:resolved) { ::Gitlab::Graphql::Lazy.force(resolve) }
context 'reading the field of a lazy value' do
let(:ability) { :read_field }
......@@ -240,16 +240,6 @@ RSpec.describe Gitlab::Graphql::Authorize::AuthorizeFieldService do
end
it_behaves_like 'authorizing fields'
context 'the graphql_lazy_authorization feature flag is disabled' do
before do
stub_feature_flags(graphql_lazy_authorization: false)
end
subject(:resolved) { resolve }
it_behaves_like 'authorizing fields'
end
end
private
......
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