Commit 48e4f3fa authored by Kerri Miller's avatar Kerri Miller

Merge branch 'ajk-jira-projects-resolver' into 'master'

Use DSL method in JiraProjectsResolver

See merge request gitlab-org/gitlab!50456
parents 1f51d12a abb7a6c0
...@@ -6,6 +6,7 @@ module Resolvers ...@@ -6,6 +6,7 @@ module Resolvers
include Gitlab::Graphql::Authorize::AuthorizeResource include Gitlab::Graphql::Authorize::AuthorizeResource
type Types::Projects::Services::JiraProjectType.connection_type, null: true type Types::Projects::Services::JiraProjectType.connection_type, null: true
authorize :admin_project
argument :name, argument :name,
GraphQL::STRING_TYPE, GraphQL::STRING_TYPE,
...@@ -31,10 +32,6 @@ module Resolvers ...@@ -31,10 +32,6 @@ module Resolvers
end end
end end
def authorized_resource?(project)
Ability.allowed?(context[:current_user], :admin_project, project)
end
private private
alias_method :jira_service, :object alias_method :jira_service, :object
......
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