Class: Types::PermissionTypes::Namespaces::Base

Inherits:
BasePermissionType show all
Defined in:
app/graphql/types/permission_types/namespaces/base.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?, #can_all?, #can_any?

Methods inherited from BaseObject

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

Methods included from Gitlab::Graphql::Present

#present, #unpresented

Instance Method Details

#read_crm_contactObject



25
26
27
# File 'app/graphql/types/permission_types/namespaces/base.rb', line 25

def read_crm_contact
  Ability.allowed?(context[:current_user], :read_crm_contact, object.crm_group)
end

#read_crm_organizationObject



29
30
31
# File 'app/graphql/types/permission_types/namespaces/base.rb', line 29

def read_crm_organization
  Ability.allowed?(context[:current_user], :read_crm_organization, object.crm_group)
end