summaryrefslogtreecommitdiff
path: root/app/graphql/mutations/base_mutation.rb
diff options
context:
space:
mode:
authorLuke Duncalfe <lduncalfe@eml.cc>2019-07-01 16:44:51 +1200
committerLuke Duncalfe <lduncalfe@eml.cc>2019-07-11 15:08:34 +1200
commit67030789f5f5eff1d558e04cfbc9bf60316c46f0 (patch)
tree76a4ca3eccc18e381ddbaf88b89946df1fcc1403 /app/graphql/mutations/base_mutation.rb
parent056166db0adbc34a8f7d8cf04136ed1ae976c9bb (diff)
downloadgitlab-ce-67030789f5f5eff1d558e04cfbc9bf60316c46f0.tar.gz
Include AuthorizeResource module for all mutationsgraphql-include-authorization-for-mutations
This makes our authorization calls available to all GraphQL mutations without the additional step of including the module first.
Diffstat (limited to 'app/graphql/mutations/base_mutation.rb')
-rw-r--r--app/graphql/mutations/base_mutation.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/graphql/mutations/base_mutation.rb b/app/graphql/mutations/base_mutation.rb
index 08d2a1f18a3..7273a74cb86 100644
--- a/app/graphql/mutations/base_mutation.rb
+++ b/app/graphql/mutations/base_mutation.rb
@@ -2,6 +2,7 @@
module Mutations
class BaseMutation < GraphQL::Schema::RelayClassicMutation
+ prepend Gitlab::Graphql::Authorize::AuthorizeResource
prepend Gitlab::Graphql::CopyFieldDescription
field :errors, [GraphQL::STRING_TYPE],