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
1b99ac21
Commit
1b99ac21
authored
Dec 04, 2020
by
Alex Kalderimis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove dead code
parent
7d1278ad
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
39 deletions
+1
-39
app/graphql/resolvers/projects/jira_imports_resolver.rb
app/graphql/resolvers/projects/jira_imports_resolver.rb
+0
-24
app/graphql/types/jira_import_type.rb
app/graphql/types/jira_import_type.rb
+1
-2
spec/support/shared_examples/graphql/jira_import/jira_import_resolver_shared_examples.rb
...aphql/jira_import/jira_import_resolver_shared_examples.rb
+0
-13
No files found.
app/graphql/resolvers/projects/jira_imports_resolver.rb
deleted
100644 → 0
View file @
7d1278ad
# frozen_string_literal: true
module
Resolvers
module
Projects
class
JiraImportsResolver
<
BaseResolver
prepend
::
ManualAuthorization
include
Gitlab
::
Graphql
::
Authorize
::
AuthorizeResource
type
Types
::
JiraImportType
.
connection_type
,
null:
true
alias_method
:project
,
:object
def
resolve
(
**
args
)
authorize!
(
project
)
project
.
jira_imports
end
def
authorized_resource?
(
project
)
context
[
:current_user
].
present?
&&
Ability
.
allowed?
(
context
[
:current_user
],
:read_project
,
project
)
end
end
end
end
app/graphql/types/jira_import_type.rb
View file @
1b99ac21
...
...
@@ -2,8 +2,7 @@
module
Types
# rubocop: disable Graphql/AuthorizeTypes
# Authorization is at project level for owners or admins,
# so it is added directly to the Resolvers::JiraImportsResolver
# Authorization is at project level for owners or admins
class
JiraImportType
<
BaseObject
graphql_name
'JiraImport'
...
...
spec/support/shared_examples/graphql/jira_import/jira_import_resolver_shared_examples.rb
deleted
100644 → 0
View file @
7d1278ad
# frozen_string_literal: true
RSpec
.
shared_examples
'no Jira import data present'
do
it
'returns none'
do
expect
(
resolve_imports
).
to
be_empty
end
end
RSpec
.
shared_examples
'no Jira import access'
do
it
'returns nil'
do
expect
(
resolve_imports
).
to
be_nil
end
end
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