summaryrefslogtreecommitdiff
path: root/app/graphql/types/base_object.rb
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2018-06-25 10:59:00 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2018-06-28 13:50:17 +0200
commit54b56f20b7a70d3e6284c8105eb3d4a568e255b0 (patch)
treede18fca7bd27dcd55817e21c4654cf36c1430c5f /app/graphql/types/base_object.rb
parent627236c9edd7f085ec5070ef7fcfbcbfc9b6de78 (diff)
downloadgitlab-ce-54b56f20b7a70d3e6284c8105eb3d4a568e255b0.tar.gz
Expose permissions on types in GraphQL
This adds a reusable way to expose permissions for a user to types in GraphQL.
Diffstat (limited to 'app/graphql/types/base_object.rb')
-rw-r--r--app/graphql/types/base_object.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/graphql/types/base_object.rb b/app/graphql/types/base_object.rb
index e033ef96ce9..754adf4c04d 100644
--- a/app/graphql/types/base_object.rb
+++ b/app/graphql/types/base_object.rb
@@ -1,6 +1,7 @@
module Types
class BaseObject < GraphQL::Schema::Object
prepend Gitlab::Graphql::Present
+ prepend Gitlab::Graphql::ExposePermissions
field_class Types::BaseField
end