Module: Projects::Issues::ServiceDeskHelper

Defined in:
app/helpers/projects/issues/service_desk_helper.rb

Instance Method Summary collapse

Instance Method Details

#service_desk_meta(project) ⇒ Object


4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'app/helpers/projects/issues/service_desk_helper.rb', line 4

def service_desk_meta(project)
  empty_state_meta = {
    is_service_desk_supported: Gitlab::ServiceDesk.supported?,
    is_service_desk_enabled: project.service_desk_enabled?,
    can_edit_project_settings: can?(current_user, :admin_project, project)
  }

  if Gitlab::ServiceDesk.supported?
    empty_state_meta.merge(supported_meta(project))
  else
    empty_state_meta.merge(unsupported_meta(project))
  end
end