Commit 585602a1 authored by Vitali Tatarintev's avatar Vitali Tatarintev

Replace authorized_resource? with authorize method

parent c9c83537
......@@ -7,6 +7,8 @@ module Mutations
graphql_name 'JiraImportUsers'
authorize :admin_project
field :jira_users,
[Types::JiraUserType],
null: true,
......@@ -29,12 +31,6 @@ module Mutations
errors: service_response.errors
}
end
private
def authorized_resource?(project)
Ability.allowed?(context[:current_user], :admin_project, project)
end
end
end
end
......@@ -7,6 +7,8 @@ module Mutations
graphql_name 'JiraImportStart'
authorize :admin_project
field :jira_import,
Types::JiraImportType,
null: true,
......@@ -40,12 +42,6 @@ module Mutations
errors: service_response.errors
}
end
private
def authorized_resource?(project)
Ability.allowed?(context[:current_user], :admin_project, project)
end
end
end
end
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