Class: Types::WorkItems::Widgets::CrmContactsType

Inherits:
BaseObject
  • Object
show all
Defined in:
app/graphql/types/work_items/widgets/crm_contacts_type.rb

Overview

Disabling widget level authorization as it might be too granular and we already authorize the parent work item rubocop:disable Graphql/AuthorizeTypes – reason above

Instance Method Summary collapse

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

#contacts_availableObject



26
27
28
# File 'app/graphql/types/work_items/widgets/crm_contacts_type.rb', line 26

def contacts_available
  object.work_item.namespace.crm_group&.contacts&.exists? || false
end