Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
64fdc45e
Commit
64fdc45e
authored
Apr 03, 2020
by
Alexandru Croitor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set graphql jira imports data behind feature flag
parent
b0f5b3ff
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
app/graphql/resolvers/projects/jira_imports_resolver.rb
app/graphql/resolvers/projects/jira_imports_resolver.rb
+2
-0
spec/graphql/resolvers/projects/jira_imports_resolver_spec.rb
.../graphql/resolvers/projects/jira_imports_resolver_spec.rb
+10
-0
No files found.
app/graphql/resolvers/projects/jira_imports_resolver.rb
View file @
64fdc45e
...
@@ -16,6 +16,8 @@ module Resolvers
...
@@ -16,6 +16,8 @@ module Resolvers
end
end
def
authorized_resource?
(
project
)
def
authorized_resource?
(
project
)
return
false
unless
Feature
.
enabled?
(
:jira_issue_import
,
project
)
Ability
.
allowed?
(
context
[
:current_user
],
:admin_project
,
project
)
Ability
.
allowed?
(
context
[
:current_user
],
:admin_project
,
project
)
end
end
end
end
...
...
spec/graphql/resolvers/projects/jira_imports_resolver_spec.rb
View file @
64fdc45e
...
@@ -14,6 +14,16 @@ describe Resolvers::Projects::JiraImportsResolver do
...
@@ -14,6 +14,16 @@ describe Resolvers::Projects::JiraImportsResolver do
data
data
end
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
context
'when project does not have Jira import data'
do
let_it_be
(
:project
)
{
create
(
:project
,
:private
,
import_data:
nil
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:private
,
import_data:
nil
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment