Welcome to mirror list, hosted at ThFree Co, Russian Federation.

user.rb « permission_types « types « graphql « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: dba4de2daccc79b042788ff42818628263b59b76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

module Types
  module PermissionTypes
    class User < BasePermissionType
      graphql_name 'UserPermissions'

      permission_field :create_snippet

      def create_snippet
        Ability.allowed?(context[:current_user], :create_personal_snippet)
      end
    end
  end
end