Class: Types::PermissionTypes::User

Inherits:
BasePermissionType show all
Defined in:
app/graphql/types/permission_types/user.rb

Constant Summary

Constants inherited from BasePermissionType

BasePermissionType::RESOLVING_KEYWORDS

Instance Method Summary collapse

Methods inherited from BasePermissionType

abilities, ability_field, define_field_resolver_method, permission_field

Methods included from Gitlab::Allowable

#can?

Methods inherited from BaseObject

accepts, assignable?, authorization, authorize, authorized?, #current_user, #id

Methods included from Gitlab::Graphql::Present

#present, #unpresented

Instance Method Details

#create_snippetObject



10
11
12
# File 'app/graphql/types/permission_types/user.rb', line 10

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