2020-08-21 00:10:44 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module IssueLinks
|
|
|
|
class DestroyService < IssuableLinks::DestroyService
|
2022-03-22 12:07:28 +00:00
|
|
|
include IncidentManagement::UsageData
|
|
|
|
|
2020-08-21 00:10:44 +00:00
|
|
|
private
|
|
|
|
|
|
|
|
def permission_to_remove_relation?
|
|
|
|
can?(current_user, :admin_issue_link, source) && can?(current_user, :admin_issue_link, target)
|
|
|
|
end
|
|
|
|
|
2020-09-10 21:08:28 +00:00
|
|
|
def track_event
|
|
|
|
track_incident_action(current_user, target, :incident_unrelate)
|
|
|
|
end
|
2020-08-21 00:10:44 +00:00
|
|
|
end
|
|
|
|
end
|