Commit 7fc6a442 authored by Jan Provaznik's avatar Jan Provaznik

Merge branch 'add-jira-imports-feature-flag' into 'master'

Set graphql jira imports data behind project scoped feature flag

See merge request gitlab-org/gitlab!28729
parents 0d9a50ef 64fdc45e
......@@ -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