Commit ae1c4d0d authored by lauraMon's avatar lauraMon

Moves authorizations to resolvers

parent 8a36ec52
......@@ -13,9 +13,6 @@ module Mutations
null: true,
description: 'The pipeline after mutation'
authorize :update_pipeline
authorize :destroy_pipeline
private
def find_object(id:)
......
......@@ -5,6 +5,8 @@ module Mutations
class PipelineDestroy < Base
graphql_name 'PipelineDestroy'
authorize :destroy_pipeline
def resolve(id:)
pipeline = authorized_find!(id: id)
project = pipeline.project
......
......@@ -5,6 +5,8 @@ module Mutations
class PipelineRetry < Base
graphql_name 'PipelineRetry'
authorize :update_pipeline
def resolve(id:)
pipeline = authorized_find!(id: id)
project = pipeline.project
......
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