Commit 64fdc45e authored by Alexandru Croitor's avatar Alexandru Croitor

Set graphql jira imports data behind feature flag

parent b0f5b3ff
......@@ -16,6 +16,8 @@ module Resolvers
end
def authorized_resource?(project)
return false unless Feature.enabled?(:jira_issue_import, project)
Ability.allowed?(context[:current_user], :admin_project, project)
end
end
......
......@@ -14,6 +14,16 @@ describe Resolvers::Projects::JiraImportsResolver do
data
end
context 'when feature flag disabled' do
let_it_be(:project) { create(:project, :private, import_data: jira_import_data) }
before do
stub_feature_flags(jira_issue_import: false)
end
it_behaves_like 'no jira import access'
end
context 'when project does not have Jira import data' do
let_it_be(:project) { create(:project, :private, import_data: nil) }
......
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