diff options
Diffstat (limited to 'app/graphql')
-rw-r--r-- | app/graphql/resolvers/projects/snippets_resolver.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/graphql/resolvers/projects/snippets_resolver.rb b/app/graphql/resolvers/projects/snippets_resolver.rb index bf9aa45349f..22895a24054 100644 --- a/app/graphql/resolvers/projects/snippets_resolver.rb +++ b/app/graphql/resolvers/projects/snippets_resolver.rb @@ -10,6 +10,11 @@ module Resolvers def resolve(**args) return Snippet.none if project.nil? + unless project.feature_available?(:snippets, current_user) + raise Gitlab::Graphql::Errors::ResourceNotAvailable, + 'Snippets are not enabled for this Project' + end + super end |