Commit abb7a6c0 authored by Alex Kalderimis's avatar Alex Kalderimis

Use authorization DSL

This avoids reimplementing the DSL functionality, but is functionally
equivalent.
parent c7fe7d80
......@@ -6,6 +6,7 @@ module Resolvers
include Gitlab::Graphql::Authorize::AuthorizeResource
type Types::Projects::Services::JiraProjectType.connection_type, null: true
authorize :admin_project
argument :name,
GraphQL::STRING_TYPE,
......@@ -31,10 +32,6 @@ module Resolvers
end
end
def authorized_resource?(project)
Ability.allowed?(context[:current_user], :admin_project, project)
end
private
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